I am trying to open an excel file as a delimited file using VBA code (so I can perform some automated manipulations on the file from Access before importing the data into a table).
The issue I am having is with using the file open parameters (with the exception of Origin, which Access VBA accepts).
The ones in particular I need to use are DataType:=1 (xlDelimited) and Comma:=True.
The error I receive is "Named Argument Not Found."
The code I am using is as follows:
Dim xl As Object
Set xl = CreateObject("Excel.Application")
With xl
.Visible = True
.UserControl = True
.workbooks.Open "<insert file path and name here>", Origin:=2, StartRow:=1, DataType:=1, TextQualifier:=-4142, ConsecutiveDelimiter:=False, Tab:=False, Semicolon:=False, Comma:=True, Space:=False, Other:=False, FieldInfo:=Array(Array(1, 1), Array(2, 1))
If I just open the file normally, it does not open comma delimited, but instead is all inserted into column A.
I am using Access and Excel 2000.
Any help with this would be greatly appreciated.
Thanks,
~Seth Neustein
The issue I am having is with using the file open parameters (with the exception of Origin, which Access VBA accepts).
The ones in particular I need to use are DataType:=1 (xlDelimited) and Comma:=True.
The error I receive is "Named Argument Not Found."
The code I am using is as follows:
Dim xl As Object
Set xl = CreateObject("Excel.Application")
With xl
.Visible = True
.UserControl = True
.workbooks.Open "<insert file path and name here>", Origin:=2, StartRow:=1, DataType:=1, TextQualifier:=-4142, ConsecutiveDelimiter:=False, Tab:=False, Semicolon:=False, Comma:=True, Space:=False, Other:=False, FieldInfo:=Array(Array(1, 1), Array(2, 1))
If I just open the file normally, it does not open comma delimited, but instead is all inserted into column A.
I am using Access and Excel 2000.
Any help with this would be greatly appreciated.
Thanks,

~Seth Neustein