ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Userform date format problem (https://www.excelbanter.com/excel-programming/305536-userform-date-format-problem.html)

jennie

Userform date format problem
 
Hi,

I am having a problem with the date formatting in a user form text box
in excel 2000.

For example:

If in the text box you type: 03/12/04 for the 3rd december 04

The following code writes the date back to the active cell
ActiveCell.Value = Format(Me.txtDate.Value, "dd/mm/yy")

However this writes 12/03/04 onto the worksheet.

How do I get it to recognise that 03 is the day and 12 the month?

Thanks
Jenni

--
Message posted from http://www.ExcelForum.com


Ron de Bruin

Userform date format problem
 
Hi jennie .

I suggest to use a calandar control
http://www.rondebruin.nl/calendar.htm


--
Regards Ron de Bruin
http://www.rondebruin.nl


"jennie " wrote in message ...
Hi,

I am having a problem with the date formatting in a user form text box,
in excel 2000.

For example:

If in the text box you type: 03/12/04 for the 3rd december 04

The following code writes the date back to the active cell
ActiveCell.Value = Format(Me.txtDate.Value, "dd/mm/yy")

However this writes 12/03/04 onto the worksheet.

How do I get it to recognise that 03 is the day and 12 the month?

Thanks
Jennie


---
Message posted from http://www.ExcelForum.com/




jennie

Userform date format problem
 
Thanks for the info, I will give it a go

--
Message posted from http://www.ExcelForum.com



All times are GMT +1. The time now is 09:55 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com