ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Format text (https://www.excelbanter.com/excel-programming/271727-format-text.html)

Wayne[_4_]

Format text
 
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.E. McGimpsey

Format text
 
One way:

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

In article ,
"Wayne" wrote:

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



All times are GMT +1. The time now is 12:08 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com