Date Format problem

  • Thread starter Thread starter SW
  • Start date Start date
S

SW

Hi,

I am using a macro to open a csv file, make some changes then save it.
I'm using

ActiveWorkbook.SaveAs FileFormat:=xlCSVWindows
ActiveWorkbook.Close SaveChanges:=True

to save the file.

The problem is, some of the data (which I'm not changing) is dates, eg
15/02/2005
this appears in the saved file as 2/15/2005.
I've checked my International settings and they're all UK so I don't know
what's wrong.
I've tried different file formats.
I just want the date to remain unchanged.

Thanks in advance for your help.

Regards
SW
 
Under 'Customise Regional Options' is the short date format actually set to
dd/MM/yyyy ?
Peter Bircher
 
Yes, it is.
That's what baffles me.

Pete said:
Under 'Customise Regional Options' is the short date format actually set to
dd/MM/yyyy ?
Peter Bircher
 
I cured this by putting a line in the code to format the date on each row
into the format I wanted. (It was already in that format to start with, but
hey! it works.)
SW
 

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

Back
Top