Loading Add-ins Automatically Free VBA Excel @ ExcelOptimize.Com

Loading Add-ins Automatically


This tips will give you steps on how to selectively load add-ins in specific worksheet, we’re able to do this on with a little code on macro. Here’s the steps:

  1. Activate the worksheet in which you want an add-in to be loaded.
  2. Press the shortcut buttonĀ  Alt+F11 to display the VBA Editor or click on Developer ribbon and then click the Visual Basic button on the left hand side.
  3. Double-click on the “This Workbook” object in the Project Explorer. Excel opens a code window for This Workbook.
  4. Put the following code into macro windows you have loaded:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
    AddIns("Add-In Name").Installed = False
End Sub
Private Sub Workbook_Open()
    AddIns("Add-In Name").Installed = True
End Sub
  1. In the code, change the name of the add-ins (”Add-In Name”) to the real name of the add-in you want to use with the worksheet.
  2. Close the VBA Editor.
  3. Save your worksheet.

If you are not sure of the correct name for a particular add-in (see step 5), you can use the macro recorder function to record the process of activating an add-in. That will show you the exact name you should use in the above macros.

Related Post

  • Related Post

Leave a Reply