Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel VBA - Userform textbox formatting
Hi, i have created a form for an Excel SSheet, with various textboxs an
combo boxs. All work fine in that the data entered/selected ends up i the cells required. My problem is that it would like some formatting for the textboxs. Th first box contains the date: txtDate.Value = Date The date appears on the form as d/m/yy, but i would like it to b dd/mm/yy. Also when this date is placed in a cell, it is in general format jus as 1/3/04 and not as 38047, it isn't a true date. Lastly how can i apply some conditional formatting for the other boxs i.e txtWeight Number to 0 or 1 decimal places. An error message/retry - cancel button if the number is <50 and 100. Many Thank -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel VBA - Userform textbox formatting
"thesteelmaker " wrote in message
... txtDate.Value = Date The date appears on the form as d/m/yy, but i would like it to be dd/mm/yy. txtDate.Text = Format$(Date, "dd/mm/yy") .. Also when this date is placed in a cell, it is in general format just as 1/3/04 and not as 38047, it isn't a true date. Sure it is. Just format the cell in date format and see for yourself. The system is actually 38047 days since new year to 1900; which is 1/3/04. -- HTH. Best wishes Harald Followup to newsgroup only please |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel VBA - Userform Checkbox/Textbox Problem | Excel Programming | |||
Formatting userform textbox - help required | Excel Programming | |||
Formatting number in a UserForm TextBox | Excel Programming | |||
formatting text in TextBox in UserForm | Excel Programming | |||
UserForm TextBox to ActiveSheet TextBox over 256 characters | Excel Programming |