K
Kennyatwork
Hello everyone
I am entering the date and time into a textbox by running code from a
command button.
On clicking the button the date and time is inserted in the text box then at
a stage the value in the textbox is transfered to a cell on my worksheet.
When I view the sheet everything is fine and in the format I want.
The problem is the format in the textbox is Day and Month reversed!
I was using
TextBox1.Value = Now()
View in textBox {3/11/2004 4:18:03 PM} for March 11
When transfered to the cell , appeared as 11/3/04 16:18 {as I wanted}
So I tried
TextBox1.Value = Format(Now(),"D/M/YY HH:MM")
View in textBox {11/3/04 16:18}
When transfered to the cell , appeared as {3/11/04 16:18}
I checked my regional settings in control panel
Language - English
Region - United Kingdom..........Both as I want them!
Am I missing something, can I set the textbox to view in UK style and
transfer it to the cell still in UK format.
As there is a lot of data already in the sheet I do not want to start
messing with cell formatting.
Could anyone shed some light on this please.
Kenny
Using Me and excel 2000 &
Windows 2000 and excel 97 (strange mix but thats work for you!)
I am entering the date and time into a textbox by running code from a
command button.
On clicking the button the date and time is inserted in the text box then at
a stage the value in the textbox is transfered to a cell on my worksheet.
When I view the sheet everything is fine and in the format I want.
The problem is the format in the textbox is Day and Month reversed!
I was using
TextBox1.Value = Now()
View in textBox {3/11/2004 4:18:03 PM} for March 11
When transfered to the cell , appeared as 11/3/04 16:18 {as I wanted}
So I tried
TextBox1.Value = Format(Now(),"D/M/YY HH:MM")
View in textBox {11/3/04 16:18}
When transfered to the cell , appeared as {3/11/04 16:18}
I checked my regional settings in control panel
Language - English
Region - United Kingdom..........Both as I want them!
Am I missing something, can I set the textbox to view in UK style and
transfer it to the cell still in UK format.
As there is a lot of data already in the sheet I do not want to start
messing with cell formatting.
Could anyone shed some light on this please.
Kenny
Using Me and excel 2000 &
Windows 2000 and excel 97 (strange mix but thats work for you!)
