Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 08-08-2011, 08:46 AM
OTPM OTPM is offline Code to add dates Windows 7 32bit Code to add dates Office 2010 32bit
Expert
 
Join Date: Apr 2011
Location: West Midlands
Posts: 981
OTPM is on a distinguished road
Default

Hi
In the Validate_Fields() Function change:

If Not Weekday(Range("B7").Value) = vbMonday Then
MsgBox "Start Date must be a Monday (week beginning)", vbInformation

to

If Not Weekday(Range("B7").Value) = vbMonday Or vbTuesday Or vbWednesday Or vbThursday Or vbFriday Then
MsgBox "Start Date must be a Weekday", vbInformation

I think this will give you what you want. I am unable to step through the code because there are missing sheets.

Hope this helps.
Good luck.
Tony(OTPM)
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Code to add dates Calendar without actual dates parnol01 Project 1 12-16-2015 09:30 AM
Code to add dates Calculating dates Daria11 Word VBA 1 06-08-2011 06:54 PM
Code to add dates Sequential Dates in Word Ultrap3 Word 2 02-04-2011 02:53 PM
Code to add dates Calculated dates. Ziggy-R Word 10 09-28-2010 01:42 AM
Adding dates mkkram Word 0 11-27-2006 09:18 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:55 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft