View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
BadRasta BadRasta is offline
external usenet poster
 
Posts: 3
Default Edit Macro script


Hello All,
I'm putting a text file into excel and formatting it with text to column.
Another program spits out the text file, each team member must enter their
own, so they run the macro on their local machine. Is there a way for the
macro to choose only the text file and ignore all other files in the folder.
each txt file has a different alfa numeric number,
for example "ME_TOO123"
I recorded a Macro and now I'm trying to edit the following script...
Workbooks.OpenText Filename:= _
"C:\Documents and Settings\CHANGED\My Documents\ME_TOO123.txt",
Origin:= _
437, StartRow:=1, DataType:=xlDelimited,
TextQualifier:=xlDoubleQuote, _
ConsecutiveDelimiter:=True, Tab:=True, Semicolon:=True,
Comma:=False, _
Space:=True, Other:=True, OtherChar:=":", FieldInfo:=Array(Array(1,
1), _
Array(2, 1), Array(3, 1), Array(4, 1), Array(5, 1), Array(6, 1),
Array(7, 1), Array(8, 1), _
Array(9, 1)), TrailingMinusNumbers:=True

Thanks in advance...
BadRasta