+ Reply to Thread
Results 1 to 9 of 9

Textbox to Cell - Date Format changin

  1. #1
    Registered User
    Join Date
    10-10-2012
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    75

    Textbox to Cell - Date Format changin

    Hi folks

    This one is a head scratcher for me!!

    I'm creating a userform that will enter a date into the required cell - quite easy.

    however I have come into the office today and found that now, when I enter the date dd/mm/yyyy previously it entered it into the cell as dd/mm/yyyy

    Today for some reason its automatically changing it to mm/dd/yyyy!!!

    I have made some changes to the code, but nothing that should affect this.

    Can you help?!?!?!?

    Please Login or Register  to view this content.

  2. #2
    Forum Contributor guitarsweety's Avatar
    Join Date
    10-30-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2010
    Posts
    188

    Re: Textbox to Cell - Date Format changin

    Can you attach an example of your file

  3. #3
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: Textbox to Cell - Date Format changin

    Whats the format of the cell that its being put into.
    Hope this helps

    Sometimes its best to start at the beginning and learn VBA & Excel.

    Please dont ask me to do your work for you, I learnt from Reading books, Recording, F1 and Google and like having all of this knowledge in my head for the next time i wish to do it, or wish to tweak it.
    Available for remote consultancy work PM me

  4. #4
    Registered User
    Join Date
    10-10-2012
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    75

    Re: Textbox to Cell - Date Format changin

    the format of the cell is dd/mmm/yyyy

    its strange - when I enter 05/08/2014 which should be 5th August 2014 - its changing it to 8th May 2014 when it puts it in the cell.

    this has only just started to happen.

    its also nothing to do with this specific spreadsheet as i tried it in a new workbook and it does the same thing???

    I'm guessing its something to do with settings - but i havent a clue where to start!!

  5. #5
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: Textbox to Cell - Date Format changin

    Its american formatting of the date. Check the Locale on the formatting.

  6. #6
    Registered User
    Join Date
    10-10-2012
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    75

    Re: Textbox to Cell - Date Format changin

    Locale is right - says UK

    means it must be something to do with the Userform throwing the information into the cell??

  7. #7
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: Textbox to Cell - Date Format changin

    Try wrapping them in CDATE() or dateserial(year(cdate(textbox1.value)),month(cdate(textbox1.value)),day(cdate(textbox1.value)))

  8. #8
    Registered User
    Join Date
    10-10-2012
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    75

    Re: Textbox to Cell - Date Format changin

    Works perfect nathansav! thanks very much

    but why is it changing it to American style when everything is set up as English(UK)??

    bit wierd

  9. #9
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: Textbox to Cell - Date Format changin

    I dont know, it happens sometimes in Access to, there is another compuer setting that may by EN US rather than EN UK.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Excel:How change the textbox format from text to date format?
    By inpetto in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-10-2013, 08:23 AM
  2. Date format changing between cell and textbox
    By processchip in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-05-2011, 01:53 PM
  3. Format date in Textbox
    By Rick_Stanich in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-16-2009, 02:36 PM
  4. textbox to Cell date format issues
    By Panic in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-18-2008, 03:06 AM
  5. Textbox only date format
    By mondolfo in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-12-2006, 04:17 PM

Tags for this Thread

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