View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Eric[_6_] Eric[_6_] is offline
external usenet poster
 
Posts: 23
Default Opening text file in Excel

Hi,

I am trying to open a text file in EXCEL 2000, How could
I substitute in FieldInfo:= if I have a variable fields.
Sample below is only 5 fields, What if I have more than 10
fields?.

Workbooks.OpenText FileName:=App.Path
& "\" "TestFile1.txt", Origin:= xlWindows, StartRow:=1,
DataType:=xlFixedWidth, FieldInfo:= Array(Array(0, 1),
Array(10, 1), Array(49, 1), Array(68, 1))

Appreciate very much your help.
Eric