Results 1 to 3 of 3
  1. #1
    Robin_Freestun
    Guest

    DateFormat, Australia,Textboxes

    I'm having trouble getting dd/mm/yy format to be accepted in a text box. Help says the format is according to the Setup Locale, which (for Australia) is 'dd/MM/yy'. If I enter a date into a text box on a form, Excel is inconsistent. It DOESN'T recognise the locale format properly, because if I enter 10/12/01 as 10th december 2001, it converts it to 12/10/01 and the worksheet (where the textbox content is pasted) tells me 12th october 2001. If I enter 12/15/01 Excel sets date to 12/15/01, and acknowledges 15th dec., and if I type 12/11/01 Excel sets 11th december, but these are all mm/dd/yy formats. How can I set the textbox format to accept dd/mm/yy entries?

    Thanks in advance for any interest in this. I'm trying to wean a customer off my skills, but need to fix this first!!

    Robin

  2. #2
    Platinum Lounger
    Join Date
    Dec 2000
    Location
    Queanbeyan, New South Wales, Australia
    Posts
    3,730
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: DateFormat, Australia,Textboxes

    Robin,

    Try formatting the date from the textbox in a format which Excel find unambiguous:

    cells(1,1) = Format(TextBox1.Value, "dd/MMM/YYYY")
    Subway Belconnen- home of the Signboard to make you smile. Get (almost) daily updates- follow SubwayBelconnen on Twitter.

  3. #3
    Robin_Freestun
    Guest

    Re: DateFormat, Australia,Textboxes

    Thank you, that looks just the ticket, there are so many VBA possibilities to learn. I'll file that one away.
    Robin

Posting Permissions

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