Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
calendar control
Hello group,
How can I get the number of the month when the new month event happens, I'm trying to display a spreadsheet in a userform depending on the month the user has chosen, see code 'msgbox calendar1.month <- this returns a 0, it does return the month number only if I click in a new month but if I select the month in the combo box nothing would happen Private Sub Calendar1_NewMonth() If Calendar1.Month = 3 Then UserForm4.Spreadsheet1.HTMLURL = "H:\Gerardo\p_mar.htm" ElseIf Calendar1.Month = 2 Then UserForm4.Spreadsheet1.HTMLURL = "H:\Gerardo\p_feb.htm" Else MsgBox "No data was found for selected date", vbExclamation End If End Sub please advice thanks to all !! Gerardo |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
calendar control
Hi Gerardo
MsgBox Month(Calendar1.Value) -- Regards Ron de Bruin http://www.rondebruin.nl "msnews.microsoft.com" wrote in message ... Hello group, How can I get the number of the month when the new month event happens, I'm trying to display a spreadsheet in a userform depending on the month the user has chosen, see code 'msgbox calendar1.month <- this returns a 0, it does return the month number only if I click in a new month but if I select the month in the combo box nothing would happen Private Sub Calendar1_NewMonth() If Calendar1.Month = 3 Then UserForm4.Spreadsheet1.HTMLURL = "H:\Gerardo\p_mar.htm" ElseIf Calendar1.Month = 2 Then UserForm4.Spreadsheet1.HTMLURL = "H:\Gerardo\p_feb.htm" Else MsgBox "No data was found for selected date", vbExclamation End If End Sub please advice thanks to all !! Gerardo |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Calendar Control | Excel Discussion (Misc queries) | |||
Calendar Control: Can't exit design mode because control can't be created | Excel Programming | |||
Calendar Control | Excel Programming | |||
calendar control | Excel Programming | |||
Calendar Control 10.0 | Excel Programming |