XLL+ Class Library

Frequently Asked Questions

This page contains questions that are frequently asked, and either answers them, or points you to the solution.

Note You may find a more up-to-date set of questions on-line at http://www.planatechsolutions.com/nav.asp?section=faq.

The questions and answers below are grouped by the following topics:

Licenses

  1. Does XLL+ require run-time licenses?

    No. Each developer using XLL+ to produce Excel add-ins needs a license for XLL+, but you can distibute your compiled add-ins to other users freely; they do not need licenses to run your add-ins.

  2. I have purchased and installed the licensed version of XLL+. Why do I still get "License has expired" messages?

    Make sure that you have rebuilt all your XLLs using the licensed versions of the run-time libraries. See Demo Licenses for more information.

Function Wizard

  1. I can't find the XLL+ Function Wizard or the XLL+ tool-bar. Where is it?

    If you've installed XLL+, and you can't find the Function Wizard, look at Installing the Function Wizard under Developer Studio 6 or Installing the Function Wizard under Developer Studio .NET or Visual Studio 2005.

  2. The descriptions of the last arguments are the same as the description of an earlier argument

    See the Technical Note: Limits of argument descriptions

Build Errors

  1. When building a project, the compiler fails with error C1083

    When compiling an XLL+ project, the following error occurs:

    fatal error C1083: Cannot open include file: 'xllplus.h': No such file or directory
    

    See Technical note: Compiler Error C1083

  2. After saving a project, the linker fails with error LNK2005

    After adding a new source file or library to an XLL+ project and saving the project, the following linker error occurs:

    LNK2005: symbol multiply defined
    In particular, this can occur in a project which previously linked perfectly.

    See Technical note: Linker Error LNK2005

Excel Formula Wizard

  1. Functions with no arguments have no description in the Excel Formula Wizard

    See the Technical Note.

  2. How do I stop a function from calculating in the Excel Formula Wizard?

    See the Disabled in Excel Formula Wizard command and the CXllApp::IsInFormulaWizard method.

Graphical User Interface

  1. How do I add my own menus to the Excel main menu bar?

    For examples, see the Simple Menus sample and the Advanced Menus sample.

  2. How do I call the Windows MessageBox() function?

    See CXllApp::WinMessageBox

  3. How do I show an MFC dialog?

    First of all, you need to select the MFC build of XLL+ in the AppWizard. If you don't know how to do that, look at Using the Microsoft Foundation Classes in the XLL+ User Guide

    Then create an instance of CExcelWnd, which will represent Excel's main window in the MFC window hierarchy. Using the CExcelWnd as the parent window, call the dialog's DoModal() method.

    See the MfcTutorial sample for an example.

Visual Basic & VBA

  1. How do I call an XLL add-in function from VBA?

    The easiest way is to use Application.Run(...). The first argument should be the function name (unadorned by any library names), followed by the arguments to the add-in function. The Application.Run() method will convert Excel COM data types (such as Ranges, variants and arrays) to the appropriate data types before calling the add-in function. It will also convert the result into a COM Variant type.

Calling Functions

  1. How do I call an XLL add-in function from VBA?

    The easiest way is to use Application.Run(...). The first argument should be the function name (unadorned by any library names), followed by the arguments to the add-in function. The Application.Run() method will convert Excel COM data types (such as Ranges, variants and arrays) to the appropriate data types before calling the add-in function. It will also convert the result into a COM Variant type.

  2. How do I call an Excel worksheet function from my add-in?

    The CXlFuncs object contains static methods for calling most Excel worksheet functions. For example, the following code transposes an array, using the Excel TRANSPOSE worksheet function:

    CXlOper xloArray, xloResult;
    CXlFuncs::Transpose(xloResult, xloArray);

    See also the CallExcel sample.

  3. How do I call one add-in function from another add-in function?

    See CXlOper::CallAddin.

Registering Functions

  1. How do I decide, at run time, which functions to register?

    See PartialReg sample.

See Also

Samples and Walkthroughs | Sample applications | Walkthroughs | Example code | How Do I...