LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 57
Default user form text box date problems

I Have a user form with a no. of text boxes

textbox 3 to 5 the user is required to enter a date in the numeric format

2 day characters then 2 month characters and then the year

e.g.

10-09-2005 (ex1) or 15-09-2005 (ex2)

I Have the following code attached to a button on the user form to do this.

Worksheets("MainPage").range("C22").Value = Format(TextBox3.Text,_
"dd-mm-yyyy")
Worksheets("Data Entry").range("B2").Value = Format(TextBox4.Text,_
"dd-mm-yyyy")
Worksheets("Data Entry").range("B3").Value = Format(TextBox5.Text,_
"dd-mm-yyyy")

The problem is the when a date is used such as ex1 above when the date gets
to the worksheet the month and day part has been reversed.

Also when you look at hte cell on the work sheet it has been formatted as
09/10/2005. Which is not the instruction in the format command.

Any help you can provide would be appreciated.

Regards

Francis


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with date in user form Ivo_69 New Users to Excel 3 June 24th 09 02:35 PM
Date format changes when inputed from user form Lynz Excel Discussion (Misc queries) 16 December 13th 08 11:27 PM
how to format a date/validate for a text box entry on a user form Tom Ogilvy Excel Programming 3 June 1st 05 05:06 PM
Date formatting issue in user form Jennifer Excel Programming 3 April 16th 05 09:49 AM
User Form Text Box Paul Excel Programming 2 March 12th 05 03:49 AM


All times are GMT +1. The time now is 11:11 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"