Set an Add-In to This Workbook module

W

wpreqq99

I want to make sure that anyone who runs a report will have an Add-in
set to True on their computer before they start.
I tried putting this line in the This Workbook module, but nothing
happens.

Sub AddInsSet()
AddIns.Add("Analysis ToolPak").Installed = True
End Sub

Any suggestions??
Thanks
jeff
 
D

Dave Peterson

Just because the procedure is behind ThisWorkbook doesn't mean that it'll run
automatically.

The workbook_open event is the built-in event that you wnat to use:

Option Explicit
Private Sub Workbook_Open()
AddIns("Analysis ToolPak").Installed = True
End Sub
 
W

wpreqq99

Just because the procedure is behind ThisWorkbook doesn't mean that it'llrun
automatically.

The workbook_open event is the built-in event that you wnat to use:

Option Explicit
Private Sub Workbook_Open()
   AddIns("Analysis ToolPak").Installed = True
End Sub

Thanks Dave. I screwed up. I didn't put this in the Workbook_Open
section.
It works fine now. Thanks for the reply. I appreciate it.
jeff
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top