+ Reply to Thread
Results 1 to 4 of 4

Change date in userform listbox to dd/mm/yyyy format

  1. #1
    Registered User
    Join Date
    11-15-2013
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    41

    Change date in userform listbox to dd/mm/yyyy format

    Hi all,

    I have a userform in which a listbox resides. The user has to select an item on the listbox, fill in the userform and then the data entered will be populated against the item selected. The columns that are pulled into my listbox are columns 2,4,7,8. They are all text apart from column 8, which is the date. In the spreadsheet that the listbox pulls from, the date is in UK format. However it displays as US format inside the listbox which is very confusing for the user as we live in the UK and are used to dd/mm/yyyy! I need to be able to change it to the UK format!

    The code to the userform is below (the listbox population bit is at the end):

    Please Login or Register  to view this content.
    I have tried adding this in as the end of the code after the listbox is populated, but it is not working...any other ideas would be greatly appreciated!

    Please Login or Register  to view this content.
    Thanks!

  2. #2
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Change date in userform listbox to dd/mm/yyyy format

    You may use:
    Please Login or Register  to view this content.
    or simply:
    Please Login or Register  to view this content.
    if the cells are formatted as you wish. However the Text property can make your code slow down if you have many records.

  3. #3
    Registered User
    Join Date
    11-15-2013
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    41

    Re: Change date in userform listbox to dd/mm/yyyy format

    Hi Izandol,

    Used the first one you suggested, worked like a charm!

    Thanks so much!!

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Change date in userform listbox to dd/mm/yyyy format

    If you use the 2nd suggestion you'll get the value as it's formatted in the sheet.
    If posting code please use code tags, see here.

+ 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. Replies: 8
    Last Post: 10-02-2013, 06:23 PM
  2. Date Format Change dd-mm-yyyy to dd-mon-yyyy
    By NAGRAJ in forum Excel General
    Replies: 3
    Last Post: 08-09-2013, 10:20 AM
  3. [SOLVED] Change date format from YYYY-MM-DD hh:mm:ss to YYYY-MM-DD
    By Gunilla in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-16-2012, 12:26 PM
  4. [SOLVED] how do I change date from mm/dd/yyyy to dd:mm:yyyy format in Excel
    By Jack Wilson in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 07-18-2006, 09:00 AM
  5. [SOLVED] change date format from dd/mm/yyyy to mm/yyyy
    By flow23 in forum Excel General
    Replies: 2
    Last Post: 11-09-2005, 11:40 AM

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