I want to load a file into a spreadsheet using a macro
I use the command
Application.FindFile
Which does the job lovely but with one problem
I keep getting the message about it needing to be delimited etc. The file in question is a sheet with info that was laoded form a text file.
can I turn off this delimited box? I know I can do it by using specifying striaght of what I want
Workbooks.OpenText Filename:="filename.txt" _
, Origin:=xlWindows, StartRow:=1, DataType:=xlDelimited, TextQualifier _
:=xlNone, ConsecutiveDelimiter:=True, Tab:=True, Semicolon:=False, _
Comma:=False, Space:=True, Other:=False, 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), Array(10, 1))
but I want to be able to pick out the file from a list.
Alternatively would it be possible to read the name of the file from the open file box straight into the above code - swap "filename.txt" for a variable?
Sorry for the long question
Andrew299
I use the command
Application.FindFile
Which does the job lovely but with one problem
I keep getting the message about it needing to be delimited etc. The file in question is a sheet with info that was laoded form a text file.
can I turn off this delimited box? I know I can do it by using specifying striaght of what I want
Workbooks.OpenText Filename:="filename.txt" _
, Origin:=xlWindows, StartRow:=1, DataType:=xlDelimited, TextQualifier _
:=xlNone, ConsecutiveDelimiter:=True, Tab:=True, Semicolon:=False, _
Comma:=False, Space:=True, Other:=False, 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), Array(10, 1))
but I want to be able to pick out the file from a list.
Alternatively would it be possible to read the name of the file from the open file box straight into the above code - swap "filename.txt" for a variable?
Sorry for the long question
Andrew299