![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Apr 2002
Location: Surrey, United Kingdom
Posts: 75
|
Afternoon everyone,
I have a column of dates on a spreadsheet formatted as dd/mm/yy. These dates are linked to text boxes in a userform, however when viewed from the userform they appear as mm/dd/yy! This will make it very confusing for a user. Does anyone know how to get the dates to appear as dd/mm/yy on the userform? Many thanks, Nibbs |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Feb 2002
Location: Where the wild roses grow
Posts: 285
|
You could have a default date come up in the textbox when the userform opens so that the user knows which format to use. In the userform initialize event put this: Textbox1.Value = Format(Date, "dd/mm/yy") That'll put today's date in when they open it up, so they can change it accordingly Audiojoe |
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Apr 2002
Location: Surrey, United Kingdom
Posts: 75
|
Thanks AudioJoe,
I think a little more explanation is needed on my part. A user is prompted to enter dates and other details via a seperate userform which inputs these details to a worksheet. The user is prompted to enter the date as dd/mm/yy via the text box label. However, if a user notices a mistake with an entry, I have a seperate userform where they can edit an exisitng entry. They select the entry via a reference number and it will then show all the details for that row in seperate text boxes - one of the fields being the date. It is here where it appears as mm/dd/yy. So they enter it as one thing, then if they go back t edit it, it will be displayed to them as something else! Even though in the worksheet it remans as dd/mm/yy. So what I need is some way of specifying what date format a text box uses, as it obviously assumes a mm/dd/yy default format, and not the format from its source. Hope this explains more, Nibbs [ This Message was edited by: Nibbles on 2002-04-30 08:20 ] [ This Message was edited by: Nibbles on 2002-04-30 08:22 ] |
|
|
|
|
|
#4 |
|
Board Regular
Join Date: Mar 2002
Location: Cincinnati, Ohio, USA
Posts: 6,824
|
Audio Joe was correct...
When you populate your text boxes, force the format... For example: Text1.Text = Format(Cells(1,1),"dd/mm/yy") Tom |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|