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