+ Reply to Thread
Results 1 to 8 of 8

how does one use the NETWORKDAYS function in a excel VB macro?

  1. #1
    AC
    Guest

    how does one use the NETWORKDAYS function in a excel VB macro?

    I am writing a macro and need to calculate the workdays between 2 columns
    that have dates. I see that in Excel there is a function called NETWORKDAYS
    but when I use this in the macro it tells me that this is not defined. Help
    - is there some addin that I need to add to my microsoft Visual basic macro
    feature to use this function?

  2. #2
    Norman Jones
    Guest

    Re: how does one use the NETWORKDAYS function in a excel VB macro?

    Hi AC,

    In the VBE, add a reference to the analysis toolpak VBA:

    Tools | check 'APTVBAEN.XLS'


    ---
    Regards,
    Norman



    "AC" <[email protected]> wrote in message
    news:[email protected]...
    >I am writing a macro and need to calculate the workdays between 2 columns
    > that have dates. I see that in Excel there is a function called
    > NETWORKDAYS
    > but when I use this in the macro it tells me that this is not defined.
    > Help
    > - is there some addin that I need to add to my microsoft Visual basic
    > macro
    > feature to use this function?




  3. #3
    Norman Jones
    Guest

    Re: how does one use the NETWORKDAYS function in a excel VB macro?

    Hi AC,

    > Tools | check 'APTVBAEN.XLS'


    Should read:

    Tools References | Check 'APTBAEN.XLS'

    ---
    Regards,
    Norman


    "Norman Jones" <[email protected]> wrote in message
    news:[email protected]...
    > Hi AC,
    >
    > In the VBE, add a reference to the analysis toolpak VBA:
    >
    > Tools | check 'APTVBAEN.XLS'
    >
    >
    > ---
    > Regards,
    > Norman
    >
    >




  4. #4
    Jim May
    Guest

    Re: how does one use the NETWORKDAYS function in a excel VB macro?

    I just went to my VBE Tools REferences to see if I had this loaded, and I
    didn't see it.
    I went to reg Excel and did Tools, Add-Ins
    Saw "Analysis-Tool-Pak-VBA << Unchecked
    so I checked it and OK'd out.
    I closed Excel totally, and reloaded.

    Then I went back to VBE - Tools References, and there
    saw atpvbaen.xls listed, but unchecked.. so I checked it.
    and Ok'd out.
    So the file name is:

    ATPVBAEN.xls

    Last thing (with question) - Now even though the ToolsPak-VBA box is checked
    IN BOTH REG EXCEL
    AND VBE-Tools REf, when I highlight it (in either window) and click on the
    browse button I'm taken to a Folder without the atpvbaen appearing

    Independently, in Explorer I can find the atpvbaen.xla file in:
    C:\Program Files\Microsoft Office\OFFICE11\Library\Analysis

    I must guess that mysteriously I'm "hooked-Up" somehow////???


    "Norman Jones" <[email protected]> wrote in message
    news:[email protected]...
    > Hi AC,
    >
    >> Tools | check 'APTVBAEN.XLS'

    >
    > Should read:
    >
    > Tools References | Check 'APTBAEN.XLS'
    >
    > ---
    > Regards,
    > Norman
    >
    >
    > "Norman Jones" <[email protected]> wrote in message
    > news:[email protected]...
    >> Hi AC,
    >>
    >> In the VBE, add a reference to the analysis toolpak VBA:
    >>
    >> Tools | check 'APTVBAEN.XLS'
    >>
    >>
    >> ---
    >> Regards,
    >> Norman
    >>
    >>

    >
    >




  5. #5
    Jim May
    Guest

    Re: how does one use the NETWORKDAYS function in a excel VB macro?

    Also now when I close and re-enter my VBE environmnet my immediate window
    contains:

    [auto_open] <
    [SetupFunctionIDs] <
    [SetupFunctionIDs] >
    [PickPlatform] <
    [PickPlatform] >
    [VerifyOpen] <
    [VerifyOpen] > 1
    [RegisterFunctionIDs] <
    [RegisterFunctionIDs] >
    [auto_open] >

    How can I Clean-this-up, where it
    no longer appears?



    "Jim May" <[email protected]> wrote in message
    news:Qpm8f.5353$mV4.3576@dukeread02...
    >I just went to my VBE Tools REferences to see if I had this loaded, and I
    >didn't see it.
    > I went to reg Excel and did Tools, Add-Ins
    > Saw "Analysis-Tool-Pak-VBA << Unchecked
    > so I checked it and OK'd out.
    > I closed Excel totally, and reloaded.
    >
    > Then I went back to VBE - Tools References, and there
    > saw atpvbaen.xls listed, but unchecked.. so I checked it.
    > and Ok'd out.
    > So the file name is:
    >
    > ATPVBAEN.xls
    >
    > Last thing (with question) - Now even though the ToolsPak-VBA box is
    > checked IN BOTH REG EXCEL
    > AND VBE-Tools REf, when I highlight it (in either window) and click on the
    > browse button I'm taken to a Folder without the atpvbaen appearing
    >
    > Independently, in Explorer I can find the atpvbaen.xla file in:
    > C:\Program Files\Microsoft Office\OFFICE11\Library\Analysis
    >
    > I must guess that mysteriously I'm "hooked-Up" somehow////???
    >
    >
    > "Norman Jones" <[email protected]> wrote in message
    > news:[email protected]...
    >> Hi AC,
    >>
    >>> Tools | check 'APTVBAEN.XLS'

    >>
    >> Should read:
    >>
    >> Tools References | Check 'APTBAEN.XLS'
    >>
    >> ---
    >> Regards,
    >> Norman
    >>
    >>
    >> "Norman Jones" <[email protected]> wrote in message
    >> news:[email protected]...
    >>> Hi AC,
    >>>
    >>> In the VBE, add a reference to the analysis toolpak VBA:
    >>>
    >>> Tools | check 'APTVBAEN.XLS'
    >>>
    >>>
    >>> ---
    >>> Regards,
    >>> Norman
    >>>
    >>>

    >>
    >>

    >
    >




  6. #6
    Norman Jones
    Guest

    Re: how does one use the NETWORKDAYS function in a excel VB macro?

    Hi Jim,

    >> So the file name is:
    >>
    >> ATPVBAEN.xls


    Indeed: A(nalysis) T(ool) P(ak) VBA EN(glish)

    A touch of momentary dyslexia on my part!

    As to the immediate window entries, those would appear to be benign and the
    result of a setup report which MS have failed tp expunge in your version - I
    may be mistaken, but did you not recentlty install xl2003?

    I do not use xl2003, at least not here, and I have not had your experience.
    Others will, therefore, be better able to comment.


    ---
    ards,
    Norman



    "Jim May" <[email protected]> wrote in message
    news:Qum8f.5356$mV4.1068@dukeread02...
    > Also now when I close and re-enter my VBE environmnet my immediate window
    > contains:
    >
    > [auto_open] <
    > [SetupFunctionIDs] <
    > [SetupFunctionIDs] >
    > [PickPlatform] <
    > [PickPlatform] >
    > [VerifyOpen] <
    > [VerifyOpen] > 1
    > [RegisterFunctionIDs] <
    > [RegisterFunctionIDs] >
    > [auto_open] >
    >
    > How can I Clean-this-up, where it
    > no longer appears?
    >
    >
    >
    > "Jim May" <[email protected]> wrote in message
    > news:Qpm8f.5353$mV4.3576@dukeread02...
    >>I just went to my VBE Tools REferences to see if I had this loaded, and I
    >>didn't see it.
    >> I went to reg Excel and did Tools, Add-Ins
    >> Saw "Analysis-Tool-Pak-VBA << Unchecked
    >> so I checked it and OK'd out.
    >> I closed Excel totally, and reloaded.
    >>
    >> Then I went back to VBE - Tools References, and there
    >> saw atpvbaen.xls listed, but unchecked.. so I checked it.
    >> and Ok'd out.
    >> So the file name is:
    >>
    >> ATPVBAEN.xls
    >>
    >> Last thing (with question) - Now even though the ToolsPak-VBA box is
    >> checked IN BOTH REG EXCEL
    >> AND VBE-Tools REf, when I highlight it (in either window) and click on
    >> the browse button I'm taken to a Folder without the atpvbaen appearing
    >>
    >> Independently, in Explorer I can find the atpvbaen.xla file in:
    >> C:\Program Files\Microsoft Office\OFFICE11\Library\Analysis
    >>
    >> I must guess that mysteriously I'm "hooked-Up" somehow////???
    >>
    >>
    >> "Norman Jones" <[email protected]> wrote in message
    >> news:[email protected]...
    >>> Hi AC,
    >>>
    >>>> Tools | check 'APTVBAEN.XLS'
    >>>
    >>> Should read:
    >>>
    >>> Tools References | Check 'APTBAEN.XLS'
    >>>
    >>> ---
    >>> Regards,
    >>> Norman
    >>>
    >>>
    >>> "Norman Jones" <[email protected]> wrote in message
    >>> news:[email protected]...
    >>>> Hi AC,
    >>>>
    >>>> In the VBE, add a reference to the analysis toolpak VBA:
    >>>>
    >>>> Tools | check 'APTVBAEN.XLS'
    >>>>
    >>>>
    >>>> ---
    >>>> Regards,
    >>>> Norman
    >>>>
    >>>>
    >>>
    >>>

    >>
    >>

    >
    >




  7. #7
    Jim May
    Guest

    Re: how does one use the NETWORKDAYS function in a excel VB macro?

    Yes, I did recently install 2003;
    What about the fact (earlier q) that in the case of my two dialog boxes
    Excel reg, and VBE -- when I select the files and click on Browse - I'm not
    immediately "attached" to the file in my folder:
    C:\Program Files\Microsoft Office\OFFICE11\Library\Analysis
    where it resides?
    hummmmm...
    Appreciate your assistance,
    Jim

    "Norman Jones" <[email protected]> wrote in message
    news:%[email protected]...
    > Hi Jim,
    >
    >>> So the file name is:
    >>>
    >>> ATPVBAEN.xls

    >
    > Indeed: A(nalysis) T(ool) P(ak) VBA EN(glish)
    >
    > A touch of momentary dyslexia on my part!
    >
    > As to the immediate window entries, those would appear to be benign and
    > the result of a setup report which MS have failed tp expunge in your
    > version - I may be mistaken, but did you not recentlty install xl2003?
    >
    > I do not use xl2003, at least not here, and I have not had your
    > experience. Others will, therefore, be better able to comment.
    >
    >
    > ---
    > ards,
    > Norman
    >
    >
    >
    > "Jim May" <[email protected]> wrote in message
    > news:Qum8f.5356$mV4.1068@dukeread02...
    >> Also now when I close and re-enter my VBE environmnet my immediate window
    >> contains:
    >>
    >> [auto_open] <
    >> [SetupFunctionIDs] <
    >> [SetupFunctionIDs] >
    >> [PickPlatform] <
    >> [PickPlatform] >
    >> [VerifyOpen] <
    >> [VerifyOpen] > 1
    >> [RegisterFunctionIDs] <
    >> [RegisterFunctionIDs] >
    >> [auto_open] >
    >>
    >> How can I Clean-this-up, where it
    >> no longer appears?
    >>
    >>
    >>
    >> "Jim May" <[email protected]> wrote in message
    >> news:Qpm8f.5353$mV4.3576@dukeread02...
    >>>I just went to my VBE Tools REferences to see if I had this loaded, and I
    >>>didn't see it.
    >>> I went to reg Excel and did Tools, Add-Ins
    >>> Saw "Analysis-Tool-Pak-VBA << Unchecked
    >>> so I checked it and OK'd out.
    >>> I closed Excel totally, and reloaded.
    >>>
    >>> Then I went back to VBE - Tools References, and there
    >>> saw atpvbaen.xls listed, but unchecked.. so I checked it.
    >>> and Ok'd out.
    >>> So the file name is:
    >>>
    >>> ATPVBAEN.xls
    >>>
    >>> Last thing (with question) - Now even though the ToolsPak-VBA box is
    >>> checked IN BOTH REG EXCEL
    >>> AND VBE-Tools REf, when I highlight it (in either window) and click on
    >>> the browse button I'm taken to a Folder without the atpvbaen appearing
    >>>
    >>> Independently, in Explorer I can find the atpvbaen.xla file in:
    >>> C:\Program Files\Microsoft Office\OFFICE11\Library\Analysis
    >>>
    >>> I must guess that mysteriously I'm "hooked-Up" somehow////???
    >>>
    >>>
    >>> "Norman Jones" <[email protected]> wrote in message
    >>> news:[email protected]...
    >>>> Hi AC,
    >>>>
    >>>>> Tools | check 'APTVBAEN.XLS'
    >>>>
    >>>> Should read:
    >>>>
    >>>> Tools References | Check 'APTBAEN.XLS'
    >>>>
    >>>> ---
    >>>> Regards,
    >>>> Norman
    >>>>
    >>>>
    >>>> "Norman Jones" <[email protected]> wrote in message
    >>>> news:[email protected]...
    >>>>> Hi AC,
    >>>>>
    >>>>> In the VBE, add a reference to the analysis toolpak VBA:
    >>>>>
    >>>>> Tools | check 'APTVBAEN.XLS'
    >>>>>
    >>>>>
    >>>>> ---
    >>>>> Regards,
    >>>>> Norman
    >>>>>
    >>>>>
    >>>>
    >>>>
    >>>
    >>>

    >>
    >>

    >
    >




  8. #8
    Norman Jones
    Guest

    Re: how does one use the NETWORKDAYS function in a excel VB macro?

    Hi Jim,

    There is an ATP addin for Excel and another addin (ATPVBAEN) for VBA.

    If you look at the addin list in Excel, you should see both.

    ---
    Regards,
    Norman



    "Jim May" <[email protected]> wrote in message
    news:Qpm8f.5353$mV4.3576@dukeread02...
    >I just went to my VBE Tools REferences to see if I had this loaded, and I
    >didn't see it.
    > I went to reg Excel and did Tools, Add-Ins
    > Saw "Analysis-Tool-Pak-VBA << Unchecked
    > so I checked it and OK'd out.
    > I closed Excel totally, and reloaded.
    >
    > Then I went back to VBE - Tools References, and there
    > saw atpvbaen.xls listed, but unchecked.. so I checked it.
    > and Ok'd out.
    > So the file name is:
    >
    > ATPVBAEN.xls
    >
    > Last thing (with question) - Now even though the ToolsPak-VBA box is
    > checked IN BOTH REG EXCEL
    > AND VBE-Tools REf, when I highlight it (in either window) and click on the
    > browse button I'm taken to a Folder without the atpvbaen appearing
    >
    > Independently, in Explorer I can find the atpvbaen.xla file in:
    > C:\Program Files\Microsoft Office\OFFICE11\Library\Analysis
    >
    > I must guess that mysteriously I'm "hooked-Up" somehow////???
    >
    >
    > "Norman Jones" <[email protected]> wrote in message
    > news:[email protected]...
    >> Hi AC,
    >>
    >>> Tools | check 'APTVBAEN.XLS'

    >>
    >> Should read:
    >>
    >> Tools References | Check 'APTBAEN.XLS'
    >>
    >> ---
    >> Regards,
    >> Norman
    >>
    >>
    >> "Norman Jones" <[email protected]> wrote in message
    >> news:[email protected]...
    >>> Hi AC,
    >>>
    >>> In the VBE, add a reference to the analysis toolpak VBA:
    >>>
    >>> Tools | check 'APTVBAEN.XLS'
    >>>
    >>>
    >>> ---
    >>> Regards,
    >>> Norman
    >>>
    >>>

    >>
    >>

    >
    >




+ 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