+ Reply to Thread
Results 1 to 6 of 6

Using Analysis ToolPak funcions in VBA

  1. #1
    Conan Kelly
    Guest

    Using Analysis ToolPak funcions in VBA

    Hello all,

    I have the Analysis ToolPak installed so the EOMONTH function is available for me to use in Excel, but when I enter
    "Application.WorksheetFunction." in VBA, it doesn't appear in the dropdown list.

    Can I use the EOMONTH function in VB code? If so, how?

    Thanks for any help anyone can provide,

    Conan Kelly



  2. #2
    Zack Barresse
    Guest

    Re: Using Analysis ToolPak funcions in VBA

    Hi there Conan,

    You must set a reference to it. Tools | References | atpvbaen.xls (atpvbaen
    = Analysis ToolPak VBA ENglish, so adjust for language).

    HTH

    --
    Regards,
    Zack Barresse, aka firefytr
    To email, remove NOSPAM


    "Conan Kelly" <CTBarbarin at msn dot com> wrote in message
    news:%[email protected]...
    > Hello all,
    >
    > I have the Analysis ToolPak installed so the EOMONTH function is available
    > for me to use in Excel, but when I enter "Application.WorksheetFunction."
    > in VBA, it doesn't appear in the dropdown list.
    >
    > Can I use the EOMONTH function in VB code? If so, how?
    >
    > Thanks for any help anyone can provide,
    >
    > Conan Kelly
    >




  3. #3
    Conan Kelly
    Guest

    Re: Using Analysis ToolPak funcions in VBA

    Zack,

    Thanks for the help,

    Conan


    "Zack Barresse" <[email protected]> wrote in message news:[email protected]...
    > Hi there Conan,
    >
    > You must set a reference to it. Tools | References | atpvbaen.xls (atpvbaen = Analysis ToolPak VBA ENglish, so adjust for
    > language).
    >
    > HTH
    >
    > --
    > Regards,
    > Zack Barresse, aka firefytr
    > To email, remove NOSPAM
    >
    >
    > "Conan Kelly" <CTBarbarin at msn dot com> wrote in message news:%[email protected]...
    >> Hello all,
    >>
    >> I have the Analysis ToolPak installed so the EOMONTH function is available for me to use in Excel, but when I enter
    >> "Application.WorksheetFunction." in VBA, it doesn't appear in the dropdown list.
    >>
    >> Can I use the EOMONTH function in VB code? If so, how?
    >>
    >> Thanks for any help anyone can provide,
    >>
    >> Conan Kelly
    >>

    >
    >




  4. #4
    Tom Ogilvy
    Guest

    Re: Using Analysis ToolPak funcions in VBA

    You don't have to set a reference, but the Analysis Tookpak VBA has to be
    loaded.

    If not reference, use application.Run as shown form the immediate window:

    ? format(Application.Run ("atpvbaen.xla!eomonth",date,2),"mm/dd/yyyy")
    06/30/2006

    If the reference is set, you don't use application or
    application.WorksheetFunction because it isn't a built in function.

    ? format(eomonth(date,2),"mm/dd/yyyy")
    06/30/2006

    so you call it like you would any vba function.

    --
    Regards,
    Tom Ogilvy



    "Zack Barresse" <[email protected]> wrote in message
    news:[email protected]...
    > Hi there Conan,
    >
    > You must set a reference to it. Tools | References | atpvbaen.xls

    (atpvbaen
    > = Analysis ToolPak VBA ENglish, so adjust for language).
    >
    > HTH
    >
    > --
    > Regards,
    > Zack Barresse, aka firefytr
    > To email, remove NOSPAM
    >
    >
    > "Conan Kelly" <CTBarbarin at msn dot com> wrote in message
    > news:%[email protected]...
    > > Hello all,
    > >
    > > I have the Analysis ToolPak installed so the EOMONTH function is

    available
    > > for me to use in Excel, but when I enter

    "Application.WorksheetFunction."
    > > in VBA, it doesn't appear in the dropdown list.
    > >
    > > Can I use the EOMONTH function in VB code? If so, how?
    > >
    > > Thanks for any help anyone can provide,
    > >
    > > Conan Kelly
    > >

    >
    >




  5. #5
    Tom Ogilvy
    Guest

    Re: Using Analysis ToolPak funcions in VBA

    Post was intended for the OP. Inadvertently replied to Zack's post.

    --
    Regards,
    Tom Ogilvy

    "Tom Ogilvy" <[email protected]> wrote in message
    news:[email protected]...
    > You don't have to set a reference, but the Analysis Tookpak VBA has to be
    > loaded.
    >
    > If not reference, use application.Run as shown form the immediate window:
    >
    > ? format(Application.Run ("atpvbaen.xla!eomonth",date,2),"mm/dd/yyyy")
    > 06/30/2006
    >
    > If the reference is set, you don't use application or
    > application.WorksheetFunction because it isn't a built in function.
    >
    > ? format(eomonth(date,2),"mm/dd/yyyy")
    > 06/30/2006
    >
    > so you call it like you would any vba function.
    >
    > --
    > Regards,
    > Tom Ogilvy
    >
    >
    >
    > "Zack Barresse" <[email protected]> wrote in message
    > news:[email protected]...
    > > Hi there Conan,
    > >
    > > You must set a reference to it. Tools | References | atpvbaen.xls

    > (atpvbaen
    > > = Analysis ToolPak VBA ENglish, so adjust for language).
    > >
    > > HTH
    > >
    > > --
    > > Regards,
    > > Zack Barresse, aka firefytr
    > > To email, remove NOSPAM
    > >
    > >
    > > "Conan Kelly" <CTBarbarin at msn dot com> wrote in message
    > > news:%[email protected]...
    > > > Hello all,
    > > >
    > > > I have the Analysis ToolPak installed so the EOMONTH function is

    > available
    > > > for me to use in Excel, but when I enter

    > "Application.WorksheetFunction."
    > > > in VBA, it doesn't appear in the dropdown list.
    > > >
    > > > Can I use the EOMONTH function in VB code? If so, how?
    > > >
    > > > Thanks for any help anyone can provide,
    > > >
    > > > Conan Kelly
    > > >

    > >
    > >

    >
    >




  6. #6
    Conan Kelly
    Guest

    Re: Using Analysis ToolPak funcions in VBA

    Zack & Tom,

    Thanks again for all of your help. It is much appreciated.

    Anyone who knows SQL Server DTS packages and saving them as VB files, I have a question posted at microsoft.public.sqlserver.dts
    that I sure could use some help with. Swing on by and take a look.

    Conan




    "Tom Ogilvy" <[email protected]> wrote in message news:[email protected]...
    > You don't have to set a reference, but the Analysis Tookpak VBA has to be
    > loaded.
    >
    > If not reference, use application.Run as shown form the immediate window:
    >
    > ? format(Application.Run ("atpvbaen.xla!eomonth",date,2),"mm/dd/yyyy")
    > 06/30/2006
    >
    > If the reference is set, you don't use application or
    > application.WorksheetFunction because it isn't a built in function.
    >
    > ? format(eomonth(date,2),"mm/dd/yyyy")
    > 06/30/2006
    >
    > so you call it like you would any vba function.
    >
    > --
    > Regards,
    > Tom Ogilvy
    >
    >
    >
    > "Zack Barresse" <[email protected]> wrote in message
    > news:[email protected]...
    >> Hi there Conan,
    >>
    >> You must set a reference to it. Tools | References | atpvbaen.xls

    > (atpvbaen
    >> = Analysis ToolPak VBA ENglish, so adjust for language).
    >>
    >> HTH
    >>
    >> --
    >> Regards,
    >> Zack Barresse, aka firefytr
    >> To email, remove NOSPAM
    >>
    >>
    >> "Conan Kelly" <CTBarbarin at msn dot com> wrote in message
    >> news:%[email protected]...
    >> > Hello all,
    >> >
    >> > I have the Analysis ToolPak installed so the EOMONTH function is

    > available
    >> > for me to use in Excel, but when I enter

    > "Application.WorksheetFunction."
    >> > in VBA, it doesn't appear in the dropdown list.
    >> >
    >> > Can I use the EOMONTH function in VB code? If so, how?
    >> >
    >> > Thanks for any help anyone can provide,
    >> >
    >> > Conan Kelly
    >> >

    >>
    >>

    >
    >




+ 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