S
solomon_monkey
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
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