+ Reply to Thread
Results 1 to 3 of 3

VBA - Generate Date Range Within 2 Supplied Dates (Modified)

  1. #1
    Registered User
    Join Date
    04-17-2009
    Location
    St. Catharines, Ontario
    MS-Off Ver
    Excel 2003
    Posts
    13

    Post VBA - Generate Date Range Within 2 Supplied Dates (Modified)

    Hello All,

    I just wanted to understand something about some code that was supplied to me on this forum. The code works perfectly, with the exception of one minor issue. The original thread and solution presented is found here

    Please Login or Register  to view this content.
    This code works perfectly, except when the value of Sheets("Main").Cells(3, 2).Value at the beginning of the FOR loop is one of the days being looked for (in this case a Sunday or a Wednesday). I would like to know if there is any small modification that I can make to the code that would allow it to not miss the last day if it is one of the days being processed.

    I have tried changing around the declaration:
    Please Login or Register  to view this content.
    but to no avail. Does anyone have any thoughts on this?
    Last edited by AErmie; 05-12-2009 at 06:50 AM. Reason: Solution Posted

  2. #2
    Forum Expert
    Join Date
    11-23-2005
    Location
    Rome
    MS-Off Ver
    Ms Office 2016
    Posts
    1,628

    Re: VBA - Generate Date Range Within 2 Supplied Dates (Modified)

    Try to modify so (see red char):
    Please Login or Register  to view this content.
    Regards,
    Antonio

  3. #3
    Registered User
    Join Date
    04-17-2009
    Location
    St. Catharines, Ontario
    MS-Off Ver
    Excel 2003
    Posts
    13

    Post Re: VBA - Generate Date Range Within 2 Supplied Dates (Modified)

    Yeah, that worked! Thanks. I knew that it was something simple but just couldn't see it. Appreciate your time.

+ 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