VBA Calendar Control Issue

skahle

New Member
Joined
Apr 30, 2009
Messages
11
I have a Excel form with a calendar control on it. I have the following event:

Private Sub calFirstCalendar_NewMonth()
calFirstCalendar.Day = 1
End Sub

This event procudure is suppose to set the day property to 1 when the user changes the month. It works! But only the first time the user changes the month. In subsequent month changes, the event is triggered but calFirstCalendar.Day is not assigned a value of 1, it is zero!!! Thus, no day is selected on the calendar and the rest of my program doesn't work! What is going on?

-Seth
 

Some videos you may like

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).

Watch MrExcel Video

Forum statistics

Threads
1,102,345
Messages
5,486,317
Members
407,539
Latest member
ltwkuav

This Week's Hot Topics

Top