Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Saving txt files and date format changes

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



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Saving txt files and date format changes

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

nicoll wrote:

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


--

Dave Peterson

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2007 - Highlights & Date Format not saving/displaying correc flexnfx Excel Discussion (Misc queries) 0 January 23rd 09 08:22 PM
Losing date format when saving .csv files Harley Excel Discussion (Misc queries) 10 December 31st 08 08:46 PM
How do i change the date format in a footer for all excel files? Diane Goncalves Excel Discussion (Misc queries) 1 March 7th 07 12:44 PM
Closing files and saving files dan Excel Worksheet Functions 0 August 15th 06 04:07 AM
Converting numbers to date format from csv files FiBee Excel Discussion (Misc queries) 1 January 12th 05 01:30 PM


All times are GMT +1. The time now is 07:07 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"