PDA

View Full Version : Format Date is wrong



bergjes
12-18-2012, 01:15 PM
Hi,
hope someone can help me out.
I'm trying to build a userform for entering data which will be written to a seperate worksheet for further analysis.

I'm a noob with VBA.

I found some code which I'm trying to adapt to my own needs.
I'm almost there, but here is my problem:

When writing the data to my seperate worksheet (DataInput), the date format is beeing altered to English, while I want it to be "dd-mm-YYYY".

I tried for ours to find how to change it, but I can't find it.
Hope you can?

The file I'm using is attached.

Thanks.
Erik

Bob Phillips
12-18-2012, 04:32 PM
That's American format not English, we use dd/mm/yyyy also.

Format the cell after populating it


Sheets("DataInput").Cells(ActiveR, 1).NumberFormat = "dd=mm=yyyy"

Paul_Hossler
12-18-2012, 05:42 PM
Should that be


"dd-mm-yyyy"


Paul

bergjes
12-19-2012, 02:32 AM
Problem Solved :)

Bob Phillips
12-19-2012, 06:16 AM
Should that be


"dd-mm-yyyy"


Paul

Nah, it looks much better with equals :doh: