Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default European Date does not work from a textbox

I have my cells format in a sheet as European date (dd/mm/yyyy - UK).
When I typed the date in or used the code, cells(1,1) = #12/31/2006#,
to input the date, it converted very well. Cell A1 will show
31/12/2006 and it is a date value.

But when I used a userform to do the input, cell A1 showed 31/12/2006,
but it showed as a text not as a date. I also tried to use
Format(Me.textbox1, "dd/mm/yyyy;@"), but it still shown as a text.

Does anyone know how you can fix this? Thanks in advanced.

009

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default European Date does not work from a textbox

Try

CDate(Me.Textbox1.Value)

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Excel 009" wrote in message
ups.com...
I have my cells format in a sheet as European date (dd/mm/yyyy - UK).
When I typed the date in or used the code, cells(1,1) = #12/31/2006#,
to input the date, it converted very well. Cell A1 will show
31/12/2006 and it is a date value.

But when I used a userform to do the input, cell A1 showed 31/12/2006,
but it showed as a text not as a date. I also tried to use
Format(Me.textbox1, "dd/mm/yyyy;@"), but it still shown as a text.

Does anyone know how you can fix this? Thanks in advanced.

009



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default European Date does not work from a textbox

Thank you so much, Bob. It works well. Why did I think of that?

009

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I convert US date with 12hr format to European date 24hr Enda K Excel Discussion (Misc queries) 1 November 15th 09 09:59 AM
European date formats lynniemilano Excel Worksheet Functions 1 September 13th 05 05:47 PM
CONVERT 11/23/04 US DATE FORMAT TO EUROPEAN 23/11/04 FATE Roland Excel Discussion (Misc queries) 2 December 20th 04 10:19 PM
Quick Date Entry European Norman Harker Excel Programming 26 April 9th 04 12:44 AM
Enter european date Pat Excel Programming 0 April 5th 04 03:31 PM


All times are GMT +1. The time now is 04:29 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"