Check if Add-in is Loaded

CPGUY33

New Member
Joined
Sep 27, 2006
Messages
9
I would like to create a macro that checks if an add-in is loaded into excel when the worksheet is opened. If it is not open than it pops up a warning stating that the add-in is not loaded and the worksheet will not work properly.

How can i check if an add-in is loaded upon opening the worksheet?
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Good afternoon CPGUY33

This would check whether the Analysis ToolPak add-in is invoked :

Code:
Sub Test()
If AddIns("Analysis ToolPak").Installed = True Then
MsgBox "Analysis ToolPak installed"
Else
MsgBox "Analysis ToolPak not installed"
End If
End Sub

HTH

DominicB
 
Upvote 0
The following macro code will check if "Analyis Toolpak" is loaded, if not it will attempt to install it.
Code:
Sub InstallAnalysisToolPak()
If AddIns("Analysis ToolPak").Installed = True Then _
    MsgBox "Analysis ToolPak is already installed" & vbCrLf & _
    "", 48, "Be Advised..."
    
    On Error GoTo ErrorHandler
        If Not AddIns("Analysis ToolPak").Installed Then
            AddIns("Analysis ToolPak").Installed = True
            AddIns("Analysis ToolPak - VBA").Installed = True
        End If
    Exit Sub
ErrorHandler:
    MsgBox "FYI, the Analysis ToolPak is not available on your system," & vbCrLf & _
           "some operations in this workbook may not function properly.", 48, "Be advised..."
    Err.Clear
End Sub
You didn't mention what Add-in you wanted to check, so change the code above to reflect your add-in.
You can put a similar macro in the "On Open" event to run each time the workbook is started.
Right Click the Excel Icon in the upper left of your worksheet, (left of the File drop-down menu).
Click "View Code"
Paste the code below into the panel that opens. ("ThisWorkBook" Module)
Alt-Q to quit the VBA Editor.
Code:
Private Sub Workbook_Open()
   'Your code here...
End Sub
 
Upvote 0
I am trying to see if the Morefunc.xll addin is loaded.
If the add-in is not loaded when you first open the sheet I get an error message:

Run-time Error '9':
Subscript out of range

whenever the AddIns("Morefunc (add-in functions)") is run.
It works perfectly fine if it is loaded.
 
Upvote 0
Maybe I'm just making this up, but I thought the latest version of morefunc let you embed the add-in to the worksheet itself so you didn't have to worry about whether the user installed it?
 
Upvote 0

Forum statistics

Threads
1,214,835
Messages
6,121,880
Members
449,057
Latest member
Moo4247

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top