![]() |
VBA Calender Formatting Date Problems
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 -- beans_2 ----------------------------------------------------------------------- beans_21's Profile: http://www.excelforum.com/member.php...fo&userid=3028 View this thread: http://www.excelforum.com/showthread.php?threadid=52884 |
VBA Calender Formatting Date Problems
Hi,
Instead of using Calendar1.Value use following : Format(Calendar1.Value, "Short Date") HTH Carim |
VBA Calender Formatting Date Problems
Your ace!! Works fine now! Thank you so much!! :) :) :) :) :) :) Dave ; -- beans_2 ----------------------------------------------------------------------- beans_21's Profile: http://www.excelforum.com/member.php...fo&userid=3028 View this thread: http://www.excelforum.com/showthread.php?threadid=52884 |
All times are GMT +1. The time now is 10:23 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com