European Date does not work from a textbox

  • Thread starter Thread starter Excel 009
  • Start date Start date
E

Excel 009

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
 
Try

CDate(Me.Textbox1.Value)

--
HTH

Bob Phillips

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top