PDA

View Full Version : User Form & Calendar



TedMosby
11-20-2008, 04:28 AM
I have this code below that is great and drops the chosen date from a popup Calendar into the TextBox on my form. My only problem is that it show in an American format how can I change it so that its showing as "dd-mmm-yy"?



Option Explicit

Private Sub Calendar1_DblClick()
usrfrmReport.txtFormDate = usrFrmCalendar.Calendar1.Value
Unload Me
End Sub




Private Sub UserForm_Initialize()
'Change the Calendar date to todays date
usrFrmCalendar.Calendar1.Value = Date
End Sub

Bob Phillips
11-20-2008, 04:55 AM
I don't get that problem, but you could try



usrfrmReport.txtFormDate = Format(usrFrmCalendar.Calendar1.Value, "dd-mmm-yy")

TedMosby
11-20-2008, 05:14 AM
Thanks for that it works now :)