+ Reply to Thread
Results 1 to 3 of 3

Issues outputting date from listbox

  1. #1
    Registered User
    Join Date
    12-20-2018
    Location
    Staffordshire, England
    MS-Off Ver
    2016
    Posts
    14

    Issues outputting date from listbox

    Hi,

    I have a strange issue when trying to get selected results out of a listbox.

    Listbox.jpg

    this is how the listbox looks

    I run this code to transfer the selected items to a worksheet.

    Please Login or Register  to view this content.
    but when I go and see the output I get a mixture of US and UK dates. In fact, when I look at the formatting for the top two dates, they are formatted as general.

    results.jpg

    I repeated the task but added dates, 23/01/2023, 31/01/2023 and 06/02/2023. The first two dates were fine, but the third date switched to US.

    It looks like if it's impossible to display a US date, e.g. 31/01/2023 it's ok. Where a date can be switched, e.g. 02/01/2023 or 02/06/2023 (can be switched to 01/02/2023 and 06/02/2023) is changes to US

    I have tried forcing the listbox to show UK format:

    Please Login or Register  to view this content.
    but this doesn't work

    Any ideas on how this can be resolved?

    TIA

  2. #2
    Forum Expert CheeseSandwich's Avatar
    Join Date
    12-22-2021
    Location
    Kent, England
    MS-Off Ver
    365 - 2402-17328.20068
    Posts
    1,359

    Re: Issues outputting date from listbox

    Try:
    Please Login or Register  to view this content.
    If things don't change they stay the same

  3. #3
    Registered User
    Join Date
    12-20-2018
    Location
    Staffordshire, England
    MS-Off Ver
    2016
    Posts
    14

    Re: Issues outputting date from listbox

    Cheese, that worked like a charm. Thank you for the quick reply.

+ 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: 03-28-2019, 10:46 AM
  2. Excel to Outlook Calendar date duplication issues and blank cells causing issues
    By singerbatfink in forum Outlook Programming / VBA / Macros
    Replies: 0
    Last Post: 02-11-2016, 08:07 AM
  3. [SOLVED] Excel to Outlook Calendar date duplication issues and blank cells causing issues
    By singerbatfink in forum Outlook Formatting & Functions
    Replies: 0
    Last Post: 02-11-2016, 07:57 AM
  4. Listbox Issues
    By cfleming13 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-09-2015, 07:53 AM
  5. Outputting information based on date
    By Calv in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-07-2014, 03:56 PM
  6. Listbox issues??
    By spinkung in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-12-2006, 11:57 AM
  7. Listbox issues??
    By spinkung in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-24-2006, 09:48 AM

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