Format text

W

Wayne

Hi,

I'm having trouble with userform I've designed.

The user enters the date into textbox1 and this is
entered into a cell, eg. A1.

The problem I have is that the date always enter the cell
in teh format mm/dd/yy, even though I have formated the
cell as dd/mm/yy. how can I correct this?

Thanks
 
J

J.E. McGimpsey

One way:

With Range("A1")
.Value = CDate(Textbox1.Text)
.NumberFormat = "dd/mm/yy"
End With
 

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

Top