+ Reply to Thread
Results 1 to 4 of 4

VBA Date Format displaying as general number within userform

  1. #1
    Registered User
    Join Date
    09-06-2016
    Location
    UK
    MS-Off Ver
    2016
    Posts
    69

    VBA Date Format displaying as general number within userform

    Hi guys,

    My code developed a problem recently, where the date format for a combobox list started displaying in general format within the userform, and within the spreadsheet (when the record was sent to the spreadsheet).

    I have a timestamp generated within the userform, which is not causing me problems, so I am stuck on the cause of this fault.

    Even within the spreadsheet I have tried formatting the column where the date information is sent to (Column E), and formatting it into ‘date format’ but that doesn’t work either..

    Here is my code:


    Please Login or Register  to view this content.
    Here is what is happening with the date within the userform...

    dateissue.JPG

  2. #2
    Forum Contributor kalbasiatka's Avatar
    Join Date
    02-27-2016
    Location
    Brest, Belarus
    MS-Off Ver
    2021
    Posts
    224

    Re: VBA Date Format displaying as general number within userform

    need to see the file
    To do it for me and help me it is 2 different things!
    Sorry for my english, blame Google translator

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

    Re: VBA Date Format displaying as general number within userform

    How are you populating the combobox on the userform?
    If posting code please use code tags, see here.

  4. #4
    Registered User
    Join Date
    09-06-2016
    Location
    UK
    MS-Off Ver
    2016
    Posts
    69

    Re: VBA Date Format displaying as general number within userform

    Quote Originally Posted by kalbasiatka View Post
    need to see the file
    Quote Originally Posted by Norie View Post
    How are you populating the combobox on the userform?
    Hi, I am populating the combobox on the userform through defined ranges (of a table), which is tgeb listed in the Row Source of the date combobox in the userform - Please see the screenshots below:

    This is my 'Date list' on a spreadsheet.

    date.JPG

    The date has been turned into table which has a defined name and range - so the range dynamically expands as I add new dates to the list:

    named range.JPG

    This is the rowsource within my userform ocmbobox - referencing the named range:

    visual basic row source.JPG

    And this is what happens with the Userform date drop down - and within the spreadsheet (I have data validation within the date spreadsheet too I must make you aware):

    2.JPG

    MAIN spread.JPG

    Thanks!

+ 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. Update given date column in general format to date format in VBA
    By l3sushi in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-02-2016, 02:32 PM
  2. Replies: 2
    Last Post: 06-02-2015, 08:42 AM
  3. [SOLVED] convert general number to date format
    By Jhon Mustofa in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-08-2014, 09:12 AM
  4. Replies: 1
    Last Post: 12-05-2013, 07:51 PM
  5. [SOLVED] Require vba or formula for convert general format data in date format
    By santosh226001 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 09-10-2013, 03:53 AM
  6. Replies: 1
    Last Post: 06-24-2009, 07:02 PM
  7. Replies: 1
    Last Post: 01-26-2006, 10:10 PM

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