+ Reply to Thread
Results 1 to 4 of 4

vba code needed to calculate the number of working days thus far for the month

  1. #1
    Forum Contributor
    Join Date
    02-24-2013
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    317

    vba code needed to calculate the number of working days thus far for the month

    I have this code that calculates the number of working days for the month. It then shows the result on a message box. This part of the code is working perfectly.

    I'm trying to add a second part (a line on the message box that also shows the number of working days thus far).
    I have this part of the code set up. But it does not calculate the number of working days.

    Could someone please take a look at this and fix the code?

    Thank you,

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: vba code needed to calculate the number of working days thus far for the month

    You have declared the variable "NetworkDays" and "nWork", but you haven't defined then anywhere. In other words in your code r = Nothing - Nothing

  3. #3
    Forum Contributor
    Join Date
    02-24-2013
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    317

    Re: vba code needed to calculate the number of working days thus far for the month

    OK. I made a few adjustments, but still can't get the calculation correct so that it returns the correct amount of weekdays worked to date.

    Any ideas? Or can soemone adjust the code to return the result (for this month, the result should be 15 as of today, Feb 22
    Thanks,

    Please Login or Register  to view this content.
    Last edited by Jim885; 02-22-2014 at 01:04 PM.

  4. #4
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: vba code needed to calculate the number of working days thus far for the month

    Same issue as before. What is "myDate"?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 15
    Last Post: 06-03-2014, 02:08 PM
  2. [SOLVED] Formula needed to calculate working days in specified month between two dates
    By webfeet2 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 10-24-2013, 02:19 AM
  3. Help needed to distribute a number over days of a month.
    By crimson_wolf in forum Excel General
    Replies: 5
    Last Post: 07-06-2012, 08:16 PM
  4. [SOLVED] Number of working days in a month
    By Sammitry in forum Excel General
    Replies: 8
    Last Post: 05-18-2012, 08:12 AM
  5. Number of Working Days in a month
    By Talbot in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-18-2008, 05:36 AM

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