Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi, Can I use " AddIns("Analysis ToolPak").Installed = True"
in my macro to make AddIns Installed automatically ever time the users open the spreadsheet? Thanks |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
Copy it in the thisworkbook module Private Sub Workbook_Open() AddIns("Analysis ToolPak").Installed = True End Sub See Chip Pearson's site also http://www.cpearson.com/excel/events.htm But not everybody have this file on his machine(you must install in from the office cd) So build in a error check Something like this Private Sub Workbook_Open() On Error Resume Next AddIns("Analysis ToolPak").Installed = True If Err.Number 0 Then MsgBox "Can't install......." Err.Clear End If On Error GoTo 0 End Sub -- Regards Ron de Bruin http://www.rondebruin.nl "broogle" wrote in message ups.com... Hi, Can I use " AddIns("Analysis ToolPak").Installed = True" in my macro to make AddIns Installed automatically ever time the users open the spreadsheet? Thanks |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi, Ron:
Do you have a solution for the case in which the VBA code calls functions from the ATP, such as YIELD, et al? In my experience, the code can't be compiled, so the Workbook_Open routine can't be run. I believe that in this situation a separate "loader" workbook that checks for the ATP has to be loaded first, and if the ATP is there, it loads the "real" workbook and closes itself. Myrna Larson On Sun, 6 Feb 2005 11:28:42 +0100, "Ron de Bruin" wrote: Hi Copy it in the thisworkbook module Private Sub Workbook_Open() AddIns("Analysis ToolPak").Installed = True End Sub See Chip Pearson's site also http://www.cpearson.com/excel/events.htm But not everybody have this file on his machine(you must install in from the office cd) So build in a error check Something like this Private Sub Workbook_Open() On Error Resume Next AddIns("Analysis ToolPak").Installed = True If Err.Number 0 Then MsgBox "Can't install......." Err.Clear End If On Error GoTo 0 End Sub |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Myrna
Never try it but I will see If I can find a solution -- Regards Ron de Bruin http://www.rondebruin.nl "Myrna Larson" wrote in message ... Hi, Ron: Do you have a solution for the case in which the VBA code calls functions from the ATP, such as YIELD, et al? In my experience, the code can't be compiled, so the Workbook_Open routine can't be run. I believe that in this situation a separate "loader" workbook that checks for the ATP has to be loaded first, and if the ATP is there, it loads the "real" workbook and closes itself. Myrna Larson On Sun, 6 Feb 2005 11:28:42 +0100, "Ron de Bruin" wrote: Hi Copy it in the thisworkbook module Private Sub Workbook_Open() AddIns("Analysis ToolPak").Installed = True End Sub See Chip Pearson's site also http://www.cpearson.com/excel/events.htm But not everybody have this file on his machine(you must install in from the office cd) So build in a error check Something like this Private Sub Workbook_Open() On Error Resume Next AddIns("Analysis ToolPak").Installed = True If Err.Number 0 Then MsgBox "Can't install......." Err.Clear End If On Error GoTo 0 End Sub |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Myrna
From a old posting from Tom. Can't you use this in combination with the open event for the VBA add-in You don't need the reference in the VBA editor this way. Sub aa() res = Application.Run("Atpvbaen.xla!Price", "2/15/91", "11/15/99", 0.0575, 0.065, 100, 2, 0) MsgBox res End Sub -- Regards Ron de Bruin http://www.rondebruin.nl "Ron de Bruin" wrote in message ... Hi Myrna Never try it but I will see If I can find a solution -- Regards Ron de Bruin http://www.rondebruin.nl "Myrna Larson" wrote in message ... Hi, Ron: Do you have a solution for the case in which the VBA code calls functions from the ATP, such as YIELD, et al? In my experience, the code can't be compiled, so the Workbook_Open routine can't be run. I believe that in this situation a separate "loader" workbook that checks for the ATP has to be loaded first, and if the ATP is there, it loads the "real" workbook and closes itself. Myrna Larson On Sun, 6 Feb 2005 11:28:42 +0100, "Ron de Bruin" wrote: Hi Copy it in the thisworkbook module Private Sub Workbook_Open() AddIns("Analysis ToolPak").Installed = True End Sub See Chip Pearson's site also http://www.cpearson.com/excel/events.htm But not everybody have this file on his machine(you must install in from the office cd) So build in a error check Something like this Private Sub Workbook_Open() On Error Resume Next AddIns("Analysis ToolPak").Installed = True If Err.Number 0 Then MsgBox "Can't install......." Err.Clear End If On Error GoTo 0 End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
NETWORKDAYS | Excel Worksheet Functions | |||
networkdays | Excel Worksheet Functions | |||
NETWORKDAYS | Excel Worksheet Functions | |||
networkdays | Excel Worksheet Functions | |||
networkdays | Excel Worksheet Functions |