Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calendar Control donwb Excel Discussion (Misc queries) 0 May 15th 09 08:31 AM
Calendar Control: Can't exit design mode because control can't be created Rone Excel Programming 0 May 24th 04 04:01 PM
Calendar Control Kelly Excel Programming 3 February 19th 04 09:36 PM
calendar control Asif[_3_] Excel Programming 8 November 30th 03 05:48 PM
Calendar Control 10.0 Michael Hertzig Excel Programming 2 November 5th 03 06:19 PM


All times are GMT +1. The time now is 12:05 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"