VBA Calender Formatting Date Problems

  • Thread starter Thread starter beans_21
  • Start date Start date
B

beans_21

Hi,

I've had a good search around about this but I don't seem to be able t
find the anwser so I aplogise if this is a duplicate post! :)

The problem I've got is, I call up a user form then the user can eithe
type in the date manually into a text box or choose to call up the vb
calender. When they call up the calender they can click on the date
the calender closes and the date is entered into the text box. Th
date format which is entered is mm-dd-yy, but when the user presses o
the date is formatted to dd-mm-yy (English boy you see!). That work
fine until it's the start of the month, because for example todays dat
is 01-04-06, it enters it into the text box as 04-01-06 and see's i
being 4th Jan 06 rather than 01st Apr 06.

Is there any way of formatting the date so that when you click th
calender the date is automatically formated to dd-mm-yy? :confused:

Any help would be great ;)

Thanks,

Dav
 
Hi,

Instead of using
Calendar1.Value
use following :
Format(Calendar1.Value, "Short Date")

HTH
Carim
 
Back
Top