Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro to load an add-in

Does anyone have an example of a macro to load an add-in
to Excel?

I have an ActiveX script which Creates an Excel
Application object, but in doing so, eliminates the Add-
ins I have saved. I need these add-ins to do some work.

Thanks,

Mark
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Macro to load an add-in

Hi Mark,

Try this:
sub auto_open()
On Error Resume Next 'LOAD & TEST SUCCESS OF LOAD
OF ANALYSIS TOOLPAC
AddIns("Analysis ToolPak").Installed = True
If AddIns("Analysis ToolPak").Installed = False Then
MsgBox "Excel's Analysis ToolPac could not be
loaded." & Chr(13) & _
"This usually means that Excel was installed
with the default settings." _
& Chr(13) & "The Analysis ToolPac includes some
spreadsheet functions used by this application." _
& Chr(13) & "To remedy the situation, it will be
necessary to load the Analysis ToolPac" _
& Chr(13) & "via the Excel installation process
(Select Custom)." & Chr(13) & _
Chr(13) & "This application will close now."
ThisWorkbook.Saved = True
Application.Quit
End
End If
On Error GoTo 0

<Any other auto_open code here

end sub

This code can also wirk within:
Private Sub Workbook_Open()
<The code here
End Sub

Best Regards,
Walt

-----Original Message-----
Does anyone have an example of a macro to load an add-in
to Excel?

I have an ActiveX script which Creates an Excel
Application object, but in doing so, eliminates the Add-
ins I have saved. I need these add-ins to do some work.

Thanks,

Mark
.

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
Macro to Load Data from ver 1 to ver 2 [email protected] Excel Discussion (Misc queries) 2 August 24th 06 01:04 AM
how do i load a dechex macro? and from where? Lumpy Excel Discussion (Misc queries) 2 April 2nd 06 03:12 PM
Macro to load on open Steve Chatham[_2_] Excel Programming 6 February 11th 04 07:20 PM
Load Macro at start up? No Name Excel Programming 1 October 28th 03 07:27 PM
Load Macro at start up? Tom Ogilvy Excel Programming 0 October 21st 03 03:49 PM


All times are GMT +1. The time now is 05:00 AM.

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"