Results 1 to 4 of 4
  1. #1
    Star Lounger
    Join Date
    Feb 2003
    Location
    near Blairgowrie, Perthshire, Scotland
    Posts
    72
    Thanks
    0
    Thanked 0 Times in 0 Posts

    calendar control (vba and word xp)

    Using the Calendar control, when you type calendar1.value you get the date in short format, eg today = 29/11/06. Is there any way (apart from a messy chunk of code) to get my hands on the long date format which I then want to put on a Word doc using MACROBUTTON?

    Thanks if anyone knows

    Rex Last

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: calendar control (vba and word xp)

    VBA has a Format() function which gives you very fine control over how a date is formatted. There are "standard" formats predefined, and then there are user-defined formats. If you wrap your return value in Format(), highlight Format and press F1, there should be a link to the formatting info (e.g., under related or see also).

  3. #3
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,508
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Re: calendar control (vba and word xp)

    -John ... I float in liquid gardens
    UTC -7ąDS

  4. #4
    Star Lounger
    Join Date
    Feb 2003
    Location
    near Blairgowrie, Perthshire, Scotland
    Posts
    72
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: calendar control (vba and word xp)

    Thanks very much for the responses. I suspected there was some well-hidden answer. I wish VBA help was less inscrutable!

    Rex Last

Posting Permissions

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