Hi,
I'm trying to convert a cell's date format to match that of the user. I have no idea what the user of the spreadsheet will wish to see, so I'm hoping to pick up the date format from there pc settings instead of hard coding "DD/MM/YYYY" or forcing them to select a date format from a combo box.
Everywhere I check on web has it hard coded...!
Any help very welcome and appreciated.
Joe
I'm trying to convert a cell's date format to match that of the user. I have no idea what the user of the spreadsheet will wish to see, so I'm hoping to pick up the date format from there pc settings instead of hard coding "DD/MM/YYYY" or forcing them to select a date format from a combo box.
Everywhere I check on web has it hard coded...!
Code:
If (c.Value2 <> "") Then
dt = CDate(c.Value2)
c.NumberFormat = "DD/MM/YYYY"
c.Value2 = dt
End If
Any help very welcome and appreciated.
Joe