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
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".

Forum statistics

Threads
1,214,971
Messages
6,122,520
Members
449,088
Latest member
RandomExceller01

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top