Date Format
Hi
- if you mean the cell itself displays mm/dd/yyyy then it would mean you
sent the data to the cell but didn't format the cell, in which case you would
need to do something like:
Dim rg As Range
Set rg = Range("A1")
rg = CDate(TextBox1) 'assign date value
rg.NumberFormat = "mm/dd/yy" 'format th value
- if by content you mean the number in the formula bar (mm/dd/yyyy).. while
the displayed date is the cell itself is mm/dd/yy, then i don't think there
is much to be done (assuming you want to keep the data as date, otherwise you
could still format the cell as text).
But maybe i didn't understand your question correctly.
--
Regards,
Sébastien
<http://www.ondemandanalysis.com
"leung747" wrote:
I have created a Userform to accept a date input (8 characters) in the form
of mm/dd/yy. When the data is transferred to the spreadsheet, the display
show mm/dd/yy but the content is changed to mm/dd/yyyy. I need the content
to stay at mm/dd/yy. Any suggestions?
Thanks!
|