visual basic user form date format dd/mm/yy not mm/dd/yy

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have set up a userform and dialog in visual basic, when the user enters the
date in dd/mm/yy format on the userform the actual data is stored on the
excel sheet as mm/dd/yy format. Can anyone suggest how to stop this please

Many thanks
 
Sub darren()
Dim d As Date
d = Now()
Range("A1").Value = d
Range("A1").NumberFormat = "dd/mm/yy"
End Sub


is an example of putting a date on the worksheet and specifying its format
at the same time.
 
Back
Top