+ Reply to Thread
Results 1 to 3 of 3

NETWORKDAYS in 2003 and 2007

  1. #1
    Forum Contributor
    Join Date
    09-28-2007
    Location
    New York, NY
    MS-Off Ver
    2007
    Posts
    120

    NETWORKDAYS in 2003 and 2007

    How can I write code that is completely compatible with 2003 and 2007 that utilizes the NETWORKDAYS function. I have this line in 2007 that is giving me trouble in 2003:

    Please Login or Register  to view this content.
    I need to rewrite it so that it works on both 2007 and 2003 without the users themselves having to make many changes in add-ons or references or things like that. Any suggestions?

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    The NETWORKDAYS Function is only a Worksheet Function since Excel 2007, in prior versions it is part of the Analysis Toolpak. You will need to write your code to check the Version running it and then apply your code based on the result.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    On checking you need to set a Reference to the analysis ToolPak in earlier versions
    - Open the VBE (Alt+F11).
    - Activate the project where you want to use the function(s).
    - Select Tools, References... and check the option atpvbaen.xls.
    - click the OK-button to close the References-dialog.

    Then you can use the Functions

    Please Login or Register  to view this content.
    or

    Please Login or Register  to view this content.

+ 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