Limit days in DTPicker

E

eager777

Does anyone have a good way to limit the days selectable in DTPicker?
I want the user to only be able to select Wednesdays.

Any help would be appreciated. Thanks
 
M

Mike

Maybe something like this may help
If Format(DTPicker0.Value, "dddd") <> "Wednesday" Then
'Exit sub
MsgBox "Why did you not select Wednesday"
Else
MsgBox "Wednesday was selected."
End If
 
D

Douglas J. Steele

Or to handle cases where the user's language may not be English,

If Weekday(DTPicker0.Value) <> dbWednesday Then
'Exit sub
MsgBox "Why did you not select Wednesday"
Else
MsgBox "Wednesday was selected."
End If
 
Top