• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Textbox Date format Switches [SOLVED]

ccsher77

New Member
Hi All,


I am back again!


I have searched various forums for the answer and whilst the date format issue using textboxes is abundant I cannot seem to find a solution to my specific problem.


OK so,


I have a workbook with 3 worksheets.

Worksheet 1 contains various textboxes into which the user adds data, in textbox1 they enter the date in a UK format i.e 01/06/2013.

attached to a command button I have a code which copies the data from the various textboxes and place it into the next empty cell on Worksheet2 this all works perfectly


On worksheet 3 I have a number of textboxes and a combobox which populates the textboxes with data from Sheet 2 based on the selection.


Again this all works well, however the date is displaying as US style in the Textboxes on sheet 3 i.e 06/01/2013 instead of the 01/06/2013 format that it was entered in Sheet1


I have checked my PC Regional settings and they are correct and I have added the following code to the input method from sheet 1


ws.Cells(iRow, 7).Value = CDate(Me.TextBox1.Value)


which ensures that the date is copied to sheet 2 in the correct format but when the textbox is populated on sheet 3 (from the combobox selection) it displays as detailed above.


Can any one help?
 
Hi Craig,


Welcome again.. :)


can you please check the below for me.. :)


Code:
ws.Cells(iRow, 7).Value2 = Format(CDate(Me.TextBox1.Value), "dd-mm-yyyy")


Regards,

Deb
 
Back
Top