Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    Aug 2001
    Location
    Surrey, United Kingdom
    Posts
    1,001
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Update Calendar Control (2003 SP2)

    Good morning

    on a UserForm I use the Calendar control but when I use the form it always shows the same initial date (the date I inserted the control 14.2.08) is this normal or can you change it somewhere to be 'today' I have looked through the properties and can see where it says 14/02/08 and whatever date I change this to then becomes the default view when the form is used, any ideas please

    Cheers

    Steve
    Cheers

    Steve

    Asking the questions everbody wants the answers too but feels too stupid to ask themselves :-)

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Update Calendar Control (2003 SP2)

    You can use the UserForm_Initialize event of the form to set the calendar's value. If you don't have code for the UserForm_Initialize event, insert the following procedure into the form's code module:

    Private Sub UserForm_Initialize()
    Me.Calendar1 = Date
    End Sub

    where Calendar1 is the name of the calendar control. If you already have code for the UserForm_Initialize event, just add the line

    Me.Calendar1 = Date

    to it.

  3. #3
    5 Star Lounger
    Join Date
    Aug 2001
    Location
    Surrey, United Kingdom
    Posts
    1,001
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Update Calendar Control (2003 SP2)

    Thanks Hans

    That was easier than I thought it was going to be

    Cheers

    Steve
    Cheers

    Steve

    Asking the questions everbody wants the answers too but feels too stupid to ask themselves :-)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •