|
|
|
|
|
|
Excel
|
Install Specific Add-in
|
|
Ease of Use
|
Easy
|
Version tested with
|
2000, 2002
|
Submitted by:
|
Justinlabenne
|
Description:
|
Used to install a specific add-in that may be necessary for your project
|
Discussion:
|
You may have a project that depends on a certain add-in to be activated so it can be used properly. This code assumes that the add-in is installed on the pc, but will return a message if it cannot be found and activated.
|
Code:
|
instructions for use
|
Option Explicit
Const mszAddinName As String = "Ref-Mixer"
Private Sub Workbook_Open()
On Error GoTo ErrHandle
AddIns(mszAddinName).Installed = True
MsgBox mszAddinName & " was loaded for use in " & ThisWorkbook.Name
Exit Sub
ErrHandle:
MsgBox "Addin to install was not found", 16
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
On Error Resume Next
AddIns(mszAddinName).Installed = False
End Sub
|
How to use:
|
- Open an Excel Workbook
- Copy the code
- Right Click on a The top left Excel icon > View Code
- Paste code into the right pane
- Press Alt+Q to return to Excel
- Save workbook before any other changes
|
Test the code:
|
- Open the Excel workbook
- If the add-in is loaded, a message will be displayed telling you so
- If not, a message will be displayed telling you the add-in cannot be found
|
Sample File:
|
Add-in test.zip 7.44KB
|
Approved by mdmackillop
|
This entry has been viewed 195 times.
|
|