+ Reply to Thread
Results 1 to 3 of 3

Date Format in userform textbox is different from excel worksheet?

  1. #1
    Registered User
    Join Date
    02-22-2013
    Location
    pakistan
    MS-Off Ver
    Excel 2007
    Posts
    89

    Date Format in userform textbox is different from excel worksheet?

    Hello Everyone...

    I have a UserForm where I pull data from worksheet to this Userform text boxes. In these Userform text boxes there is textbox for "Date"

    When my data is transfered from worksheet to these textboxes...the text box of date in Userform show different date format.

    I want Userform text boxes should show same Date format as it is in excel worksheet.

    For example in my worksheet Date formate is like " 01-January-2013"....When data is transfered to userform textbox ...its should show same date fomate.

    Please help..

    thank you.

  2. #2
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: Date Format in userform textbox is different from excel worksheet?

    VBA uses the American style date format exclusively while Excel has local settings.

    You need something like Me.TextBox1.text = format(Range("A11").value, "ddd dd mmm yyy")
    Elegant Simplicity............. Not Always

  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: Date Format in userform textbox is different from excel worksheet?

    Use the Text property instead of Value to get the date as it's formatted on the worksheet.
    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)

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