+ Reply to Thread
Results 1 to 5 of 5

VB needed to go to the closest 'Monday' date

  1. #1
    Registered User
    Join Date
    02-11-2014
    Location
    England
    MS-Off Ver
    Office 365
    Posts
    61

    VB needed to go to the closest 'Monday' date

    Hey all,

    So I have this bit of code to scroll through dates using two shapes.

    Please Login or Register  to view this content.
    How would I go about changing these to look for the closest Monday? (forward and backwards)

    Thanks in advance for your help.

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,607

    Re: VB needed to go to the closest 'Monday' date

    Previous:

    Please Login or Register  to view this content.
    Next is same only +8 instead of +1

  3. #3
    Registered User
    Join Date
    02-11-2014
    Location
    England
    MS-Off Ver
    Office 365
    Posts
    61

    Re: VB needed to go to the closest 'Monday' date

    Next works great!
    However the previous doesn't change if the date is already on a Monday?

  4. #4
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,607

    Re: VB needed to go to the closest 'Monday' date

    If you want to achieve that use:

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    02-11-2014
    Location
    England
    MS-Off Ver
    Office 365
    Posts
    61

    Re: VB needed to go to the closest 'Monday' date

    Spot on! That makes sense.

    Thank you for your help.

+ 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. move date to next Monday if date is on a Friday, Saturday or Sunday
    By ea223 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-24-2014, 01:54 PM
  2. [SOLVED] Help Needed : To find Monday date in a week
    By Elangovan89 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-19-2014, 01:51 PM
  3. [SOLVED] look-up a date in a range and find the date that is closest todays date
    By VanShark in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-12-2014, 09:46 PM
  4. [SOLVED] Display Fridays date (and message) if current date is Monday
    By Pierce Quality in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-26-2013, 09:40 AM
  5. [SOLVED] Find monday preceeding given-date unless date is a monday
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-10-2012, 07:42 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