Saving txt files and date format changes

  • Thread starter Thread starter nicoll
  • Start date Start date
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
 
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
 

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