+ Reply to Thread
Results 1 to 5 of 5

Networkdays

  1. #1
    broogle
    Guest

    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. #2
    Ron de Bruin
    Guest

    Re: 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" <[email protected]> wrote in message news:[email protected]...
    > 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. #3
    Myrna Larson
    Guest

    Re: 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" <[email protected]>
    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. #4
    Ron de Bruin
    Guest

    Re: 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" <[email protected]> wrote in message news:[email protected]...
    > 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" <[email protected]>
    > 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. #5
    Ron de Bruin
    Guest

    Re: 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" <[email protected]> wrote in message news:[email protected]...
    > 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" <[email protected]> wrote in message news:[email protected]...
    >> 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" <[email protected]>
    >> 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1