If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > User Form & Calendar

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-20-08, 03:42
JezLisle JezLisle is offline
Registered User
 
Join Date: Apr 2007
Location: Stalybridge, Manchester
Posts: 273
User Form & Calendar

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

Last edited by JezLisle; 11-20-08 at 04:28.
Reply With Quote
  #2 (permalink)  
Old 11-20-08, 07:56
MikeTheBike MikeTheBike is offline
Registered User
 
Join Date: Apr 2004
Location: Derbyshire, UK
Posts: 714
Hi

How about

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

??

MTB
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On