Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help with Calendar Control limits?!!! 1

Status
Not open for further replies.

rvmams

Technical User
Jan 28, 2003
22
0
0
GB
Is there a way to limit users input in the calendar control? I would like users only to select Monday and no other day(s) of the week.

Thx,

RvM
 
How about:

Private Sub Calendar1_Click()
Dim sday
sday = Weekday(DateAdd("d", i, Me.Calendar1.Value))
If sday <> 2 Then '2 is a monday
MsgBox &quot;This is not a Monday. I need to do something about it&quot;
End If



End Sub
 
Thanks roubin! It worked!!!!


Am definetly giving you a star for this one!

Rgds,

RvM
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top