ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   I need macro help (https://www.excelbanter.com/excel-worksheet-functions/123042-i-need-macro-help.html)

Littleguy

I need macro help
 
I have a excel template that uses the analysis toolpak. However not
everybody in my company has that function initiated. I need a macro
that will check when the program is opened and will tick the addin if
it is not already ticked.


Bob Phillips

I need macro help
 
With Application.AddIns("Analysis ToolPak")
If Not .Installed Then
.Installed = True
End If
End With


--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)


"Littleguy" wrote in message
ups.com...
I have a excel template that uses the analysis toolpak. However not
everybody in my company has that function initiated. I need a macro
that will check when the program is opened and will tick the addin if
it is not already ticked.




Gord Dibben

I need macro help
 
You need this in the Thisworkbook module

Private Sub Workbook_Open()
AddIns("analysis toolpak").Installed = True
End Sub

And maybe this to unload when workbook close.

Private Sub Workbook_BeforeClose(Cancel As Boolean)
AddIns("analysis toolpak").Installed = False
End Sub


Gord Dibben MS Excel MVP


On 18 Dec 2006 12:30:59 -0800, "Littleguy" wrote:

I have a excel template that uses the analysis toolpak. However not
everybody in my company has that function initiated. I need a macro
that will check when the program is opened and will tick the addin if
it is not already ticked.




All times are GMT +1. The time now is 11:14 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com