+ Reply to Thread
Results 1 to 3 of 3

Userform date format reverting back to us format on change event

  1. #1
    Forum Contributor
    Join Date
    06-03-2008
    MS-Off Ver
    Excel 2007 (also have access to Excel 2000/2003)
    Posts
    368

    Userform date format reverting back to us format on change event

    Hi I have created a userform but I am having extensive problems with the date formats.

    My system is set to UK and short date is set to: DD/MM/YYYY

    When I used code to add the values in the userform to the spreadsheet, any that contained a date format would revert to the US format.

    So I finally figured out to use DateValue to format it correctly for example:

    Please Login or Register  to view this content.

    This adds the data in the correct format. However when I retrieve the information using a change event for example:

    Please Login or Register  to view this content.
    They return UK formats if the month is less than 12 then revert to US if the date exceeds 12???????

    I have tried alsorts to try and rectify it but I am really struggling can anyone offer me some advice please?

    Thank you in advance.
    Last edited by jpruffle; 08-10-2009 at 12:34 PM.

  2. #2
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Userform date format reverting back to us format on change event

    If your cells are formatted to display the dates as you want, then you can just use:
    Please Login or Register  to view this content.
    Remember what the dormouse said
    Feed your head

  3. #3
    Forum Contributor
    Join Date
    06-03-2008
    MS-Off Ver
    Excel 2007 (also have access to Excel 2000/2003)
    Posts
    368

    Re: Userform date format reverting back to us format on change event

    So simple yet so amazingly brilliant... resolved it completely!

    Thank you.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1