Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default 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.

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,726
Default 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.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default 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.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
error when running cut & paste macro Otto Moehrbach Excel Worksheet Functions 4 August 9th 06 01:49 PM
Compiling macro based on cell values simonsmith Excel Discussion (Misc queries) 1 May 16th 06 08:31 PM
Search, Copy, Paste Macro in Excel [email protected] Excel Worksheet Functions 0 January 3rd 06 06:51 PM
Closing File Error jcliquidtension Excel Discussion (Misc queries) 4 October 20th 05 12:22 PM
Highlight Range - wrong macro, please edit. Danny Excel Worksheet Functions 8 October 19th 05 11:11 PM


All times are GMT +1. The time now is 08:49 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"