ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Date formatting (https://www.excelbanter.com/excel-programming/290853-date-formatting.html)

Rune_Daub[_15_]

Date formatting
 
I have a worksheet with dates in the format of dd-mm-yyyy.
This is the correct way for the date to be shown.
Now if I load that date into a userform using a textbox it shows up i
mm-dd-yyyy.
How do I change that to be shown in the correct way?
All I can read out of Excel 2000 VBA programmers reference, is that
"Trying to make your VBA code compatible with dates in all languag
versions of Excel is very difficult. See the chapter on programmin
with international clients for more details.."..

Biiiiiig help.. since the International client chapter doesnt give muc
of a hint on how to do this :)
So now I am trying you.. thx on beforehand.

Rune Dau

--
Message posted from http://www.ExcelForum.com


Bob Phillips[_6_]

Date formatting
 
Rune,

Try using the Range Text property instead of value, like so

TextBox1.Text = Range("A20").Text

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Rune_Daub " wrote in message
...
I have a worksheet with dates in the format of dd-mm-yyyy.
This is the correct way for the date to be shown.
Now if I load that date into a userform using a textbox it shows up in
mm-dd-yyyy.
How do I change that to be shown in the correct way?
All I can read out of Excel 2000 VBA programmers reference, is that
"Trying to make your VBA code compatible with dates in all language
versions of Excel is very difficult. See the chapter on programming
with international clients for more details.."..

Biiiiiig help.. since the International client chapter doesnt give much
of a hint on how to do this :)
So now I am trying you.. thx on beforehand.

Rune Daub


---
Message posted from http://www.ExcelForum.com/





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

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