Limit days in DTPicker

  • Thread starter Thread starter eager777
  • Start date Start date
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
 
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
 
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
 
Back
Top