LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default exclude holidays on UserForm Calendar control

How can I stop people selecting a listed company holiday from the calendar
control ?
I already have a named range that I'm using for the weekday function
directly on the worksheet but I can't get the syntax for getting it to work
from a userform.
For Weekends I already have Calendar1_Click do these checks
If WorksheetFunction.Weekday(Calendar1.Value) = 1
If WorksheetFunction.Weekday(Calendar1.Value) = 7
which open a msgbox "choose another date, stoopid - you'll be on vacation
that day!" (or words to that effect).

Now I need a third line for the range that includes national holidays and
other days the company will be closed.


--
David M
WinXP - Office2003 (Italian)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Exclude Sunday & Holidays Butch Excel Discussion (Misc queries) 0 May 18th 09 09:57 PM
Enter date in userform using Calendar Control Scotty9349 Excel Discussion (Misc queries) 1 March 4th 09 07:02 PM
Add days to a date, but exclude holidays Chickadee Excel Worksheet Functions 13 July 31st 08 04:22 PM
Programmactically add calendar control to userform Greg Wilson Excel Programming 7 March 3rd 06 11:18 PM
How to use Microsoft Calendar Control 9.0 on a Userform Anupam Sharma Excel Programming 4 August 27th 03 06:19 PM


All times are GMT +1. The time now is 06:13 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"