+ Reply to Thread
Results 1 to 6 of 6

Date Problems in userform

  1. #1
    Registered User
    Join Date
    01-12-2012
    Location
    Staffordshire
    MS-Off Ver
    Excel 2010
    Posts
    38

    Date Problems in userform

    what I'm having problems with is that I have UK dates in excel spreadsheet and they are dd/mmm/yyyy but some dates when I transfer them to a userform ends up US format when I show the information this userform gets used by number of users .

    I have tried number of things but nothings working .Text = Format(Reg65, "dd/mmm/yyyy")

    any help would be nice

  2. #2
    Valued Forum Contributor ranman256's Avatar
    Join Date
    07-29-2012
    Location
    Kentucky
    MS-Off Ver
    Excel 2003
    Posts
    1,177

    Re: Date Problems in userform

    changing the cell format to : "dd/mmm/yyyy", doesnt work?

    you can try some vb code, to alter the US fields to your column...
    range("B2").value= format(range("Z2").value,"dd/mmm/yyyy")

  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 Problems in userform

    How are you currently transferring the dates from the sheet to the userform?

    If you want any cell value to appear as it's formatted on the worksheet then use it's Text property, for example.
    Please Login or Register  to view this content.
    Note, when putting values from the userform to the sheet don't use Format as that converts to string, instead use the conversion functions like Val, CDate, DateValue etc.
    If posting code please use code tags, see here.

  4. #4
    Registered User
    Join Date
    01-12-2012
    Location
    Staffordshire
    MS-Off Ver
    Excel 2010
    Posts
    38

    Re: Date Problems in userform

    Thanks for your replies.
    all information on the spreadsheet get all sorted via userforms either adding information or viewing information.
    This is the code I'm using to transfer from sheet to userform

    Please Login or Register  to view this content.
    Last edited by pejabe; 03-08-2018 at 10:00 AM.

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

    Re: Date Problems in userform

    Try this for a start.
    Please Login or Register  to view this content.
    That should at least get the values from the worksheet as they are formatted on the worksheet.

  6. #6
    Registered User
    Join Date
    01-12-2012
    Location
    Staffordshire
    MS-Off Ver
    Excel 2010
    Posts
    38

    Re: Date Problems in userform

    sorry for late reply not been in office to try until now, I would like to thank you Norie its working at the moment but only tried on two machines at present.

+ 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. [SOLVED] Userform problems - message box + hide/close userform
    By mariec_06 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-09-2016, 08:37 AM
  2. Date picker, userform and other problems - Excel for mac
    By dmilanb in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-01-2016, 12:53 PM
  3. Replies: 0
    Last Post: 12-25-2011, 04:30 PM
  4. UserForm Problems
    By Az_Outlaw in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-22-2010, 01:12 PM
  5. Problems with a Userform (dynamic userform)
    By pierre08 in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 04-19-2010, 09:16 AM
  6. problems with a userform
    By filo666 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-06-2005, 09:05 PM
  7. userform problems
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-16-2005, 03:04 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