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

    Calendar Object missing (2003 SP2)

    Good evening

    I am off work for a few days and being the saddo I am I emailed myself a workbook to play with, it has a user form with a calendar object on it.

    When I open the workbook at home it says that an object is not loaded so the object will not be displayed. Checking in my system32 folder I do not have it so I have downloaded it, ensured that it is correctly loaded in the system32 folder, selected 'start' and 'run' and then regsvr32 mscal.ocx and got the succesful message.

    When I reopen the WB it does not error but when I open the user form it shows the calendar without any dates in the months, I can change the years as you would expect but I have to guess which squares the dates are in, doing that inserts an American formatted date although my system is definitely set up as English?

    Any thoughts on where I might have gone wrong?

    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: Calendar Object missing (2003 SP2)

    As an experiment, create a new workbook, then create a userform in this workbook and place a calendar control on the userform, and run the form. Does the calendar look normal?

  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: Calendar Object missing (2003 SP2)

    Hi Hans

    It displays fine in a new blank wb, I will delete it in my existing wb and try and reload it

    Thanks for the advice

    Steve
    Cheers

    Steve

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

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

    Re: Calendar Object missing (2003 SP2)

    Yes, that would be my next suggestion.

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

    Re: Calendar Object missing (2003 SP2)

    That was surprisingly simple!!

    The dates however are still displaying in the American format mm/dd/yy but for my wb I need them to show properly in dd/mm/yy format, I have gone into the Control Panel and all of my settings are for the UK, I have changed them, changed them back and restarted but that does not do any good, can I write anything into the code to say the format that I want it to display?

    Cheers

    Steve
    Cheers

    Steve

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

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

    Re: Calendar Object missing (2003 SP2)

    Does this work?

    Me.txtDateFrom = CDate(Me.Calendar1)

    If not, try this:

    Me.txtDateFrom = Format(Me.Calendar1, "dd/mm/yyyy")

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

    Re: Calendar Object missing (2003 SP2)

    Thanks again

    Me.txtDateFrom = Format(Me.Calendar1, "dd/mm/yyyy") is the one that worked but just out of interest have you any idea why it would show in the wrong format (is it perhaps because the site I downloaded the calander control zip from was American?)

    Cheers

    Steve
    Cheers

    Steve

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

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

    Re: Calendar Object missing (2003 SP2)

    It shouldn't matter where you downloaded the control from - there isn't a specific UK English version.

    I don't know why it behaves like that, but it is a problem that crops up frequently - deep down, VBA is strictly US-oriented. Sometimes it adapts itself to local settings, other times it doesn't.

Posting Permissions

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