Addins and COM Addins

Excel 2000 supports the same add-in model that is supported by Excel 97. This is the add-in model that we use to create the SRXUtils add-in.

In addition, the Office 2000 suite supports a new add-in model called the COM add-in model. A COM add-in is an ActiveX DLL or executable file that can be connected to multiple Office 2000 applications. Since this type of add-in is an ActiveX DLL or executable, it must be created using a programming environment, such as Visual Basic or Visual C++, that is capable of creating these types of files. However, Visual Basic for Applications cannot create ActiveX DLLs or executables, so it cannot be used to create COM add-ins. Debugging add-ins

An add-in can be debugged just like any other Excel workbook. You do not need to refer again to the original XLS file.

In particular, an add-in can be opened like any other Excel workbook. However, unless you know the password (assuming that the add-in has one), you will not be able to see either the add-in's code or its workbook window. Using the password, you can expand the project node in the Project window to view the code and, if you select the ThisWorkbook node and open the Properties window, change the IsAddIn property to False to display the workbook window. Now you can treat the workbook just like any other Excel workbook. Once the necessary changes have been made, you can recompile the code and return the IsAddIn property to True. Deleting an add-in

You may have noticed that the Add-Ins dialog shown in Figure 10-5 does not have a Delete button. To remove an add-in from the list, uncheck the add-in, rename the XLA file, and then check the add-in again. You will get a message asking if Excel should remove the add-in from the list. And while we are on the subject of idiosyncratic behavior, note that changes to an add-in's Title property may not be reflected in the Add-Ins dialog until Excel is shut down and reopened.

+1 0

Post a comment