Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / September 2006

Tip: Looking for answers? Try searching our database.

European Date does not work from a textbox

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Excel 009 - 19 Sep 2006 22:39 GMT
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
Bob Phillips - 19 Sep 2006 23:01 GMT
Try

   CDate(Me.Textbox1.Value)

Signature

HTH

Bob Phillips

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

> 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#,
[quoted text clipped - 8 lines]
>
> 009
Excel 009 - 20 Sep 2006 00:42 GMT
Thank you so much, Bob.  It works well.  Why did I think of that?

009
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.