#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 67
Default Networkdays

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Networkdays

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 863
Default Networkdays

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Networkdays

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Networkdays

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
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
NETWORKDAYS Connie Martin Excel Worksheet Functions 9 August 12th 08 01:38 AM
networkdays JK Excel Worksheet Functions 5 May 7th 07 07:52 PM
NETWORKDAYS Trouvera52 Excel Worksheet Functions 2 October 14th 06 12:21 AM
networkdays rsenn Excel Worksheet Functions 0 November 24th 05 12:42 AM
networkdays Christian (DK) Excel Worksheet Functions 6 November 21st 05 11:32 AM


All times are GMT +1. The time now is 02:22 PM.

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

About Us

"It's about Microsoft Excel"