Saving txt files and date format changes

N

nicoll

Can anyone help me please. I'm trying to save a file as a text file. The
file has the date in a format dd/mm/yyyy. When I save manually it saves in
the correct format, but with the following


ActiveWorkbook.SaveAs Filename:= _
"c:\myfile.txt", _
FileFormat:=xlText


the date format is saved as mm/dd/yyyy, I can't work this out.

Thanks
 
D

Dave Peterson

If you're going to import it back into excel, you could use the text to columns
wizard to make sure it's correct (and format the cells after you've imported the
file).

If you need it for a different purpose, maybe you can steal some code and create
your own macro that does it:

Earl Kiosterud's Text Write program:
http://www.tushar-mehta.com/
Look for Text Write in the left hand frame.

Chip Pearson's:
http://www.cpearson.com/excel/imptext.htm

J.E. McGimpsey's:
http://www.mcgimpsey.com/excel/textfiles.html
 
Top