Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
D D is offline
external usenet poster
 
Posts: 121
Default Userform Calendar - Current Date

How do you get the Calendar to open with the current date selected. Here is
what I have but it is not working. The calendar opens with the
date in which I created the calendar. The name of my Calendar is Calendar1.
I have tried setting the properties for the month, day, year, to be 0.

Private Sub frmCalendar_Open()
Calendar1.Value = Date

End Sub


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,069
Default Userform Calendar - Current Date

try placing your code in the userforms intialize event:

Private Sub UserForm_Initialize()
Calendar1.Value = Date
End Sub
--
JB


"D" wrote:

How do you get the Calendar to open with the current date selected. Here is
what I have but it is not working. The calendar opens with the
date in which I created the calendar. The name of my Calendar is Calendar1.
I have tried setting the properties for the month, day, year, to be 0.

Private Sub frmCalendar_Open()
Calendar1.Value = Date

End Sub


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
Enter date in userform using Calendar Control Scotty9349 Excel Discussion (Misc queries) 1 March 4th 09 07:02 PM
Convert date from Gregorian Calendar to Hijri Calendar H.Alkhodary Excel Discussion (Misc queries) 1 February 21st 09 10:11 AM
calculate prior calendar year end from a moving current date Louise Excel Worksheet Functions 1 December 6th 06 08:48 PM
calendar highlight current date Meg Excel Discussion (Misc queries) 2 April 5th 06 05:02 PM
Calendar date in UserForm benitAAvi Excel Programming 0 December 24th 04 02:21 PM


All times are GMT +1. The time now is 07:33 AM.

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"