LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Comma Delimited Text File Issue

I have been using this archive for a few months now and have found them
wonderfully useful. I have a very strange problem though... when I
define a text file and delimit it in an Excel macro it amends some
dates. In the .txt file the dates are all in the month of December
01/12/2004; 02/12/2004 etc... when I use the macro below it reverses
the dates in the cell to 12/01/2004 etc...

Sub
myFile = Application.GetOpenFilename("Text,*.txt")
Workbooks.OpenText Filename:=myFile, DataType:=xlDelimited,
Comma:=True
End Sub

If I do not have the first line of code but instead have the location
of an actual file this problem does not exist.

e.g.

Sub
Workbooks.OpenText Filename:="S:\myFile.TXT",
DataType:=xlDelimited, Comma:=True
End Sub

Any ideas would severely be appreciated as this is the first part of a
macro that I run for 15-20 different file names a week.

Solomon

 
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
Importing Comma delimited file Patsy Rogge Excel Discussion (Misc queries) 2 April 20th 06 02:50 PM
How to produce comma-delimited and quoted text file from Excel? Roger Kenner Excel Discussion (Misc queries) 1 September 15th 05 07:19 PM
How can I save a file as a comma-delimited text file in Excel? LAM Excel Discussion (Misc queries) 1 May 3rd 05 10:24 PM
how to save a file as ASCII: expanded comma delimited text (.exp). kmh Excel Discussion (Misc queries) 0 May 1st 05 01:05 AM
I have a Comma delimited text file how do I import in to excel an. trevord Excel Discussion (Misc queries) 1 February 3rd 05 11:41 PM


All times are GMT +1. The time now is 09:00 PM.

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

About Us

"It's about Microsoft Excel"