Results 1 to 8 of 8

Date formatting between Excel & Forms

Threaded View

  1. #1
    Registered User
    Join Date
    10-25-2006
    Posts
    54

    Date formatting between Excel & Forms

    Hi

    There's been a lot of messages about date formatting when using VBA which I've referred to but I still have a problem that I don't understand and am hoping someone maybe able to help and explain.

    I have a form which uses a text box to store a date. A date may be written into this text box by a user and the date is then written to the underlying workbook to be stored for future reference.

    When the form is loaded the date is loaded back into the text box on the form.

    All that works fine but the date is written to Excel in dd/mm/yy format and the text box then loads the date as mm/dd/yy.

    to write to the excel sheet;
    [range]=format(text_box1.value,"dd/mm/yy")

    to write back to the text box;
    text_box1.value=format([range],"dd/mm/yy")
    I have tried using different date formats but I always seem to get the same problem. I know that the Excel sheet is displaying the correct date. In other words the text box value seems to be written ok to the sheet. It's when the text box is given back the value that the format is changed.

    System date is English UK (dd/mm/yy).

    Many thanks
    Last edited by VBA Noob; 12-10-2007 at 03:08 PM.

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