S
Smallweed
Hi, I've been setting the following connection string with no problems in VBA
in Excel 2002:
cnn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
ThisWorkbook.Path & "\" & ThisWorkbook.Name & ";Excel 8.0;HDR=No;IMEX=1;"
However, this causes my Excel 2003 to crash horribly when the connection is
opened.
connectionstrings.com gives the following:
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\MyExcel.xls;Extended
Properties="Excel 8.0;HDR=No;IMEX=1";
I've tried including the "Extended Properties=" and tried most permuations
of quote marks and Chr(32) - all just make the VBA stop in its tracks rather
than crashing Excel.
Anyone got any ideas? Do I need a different connection string for Excel 2003?
in Excel 2002:
cnn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
ThisWorkbook.Path & "\" & ThisWorkbook.Name & ";Excel 8.0;HDR=No;IMEX=1;"
However, this causes my Excel 2003 to crash horribly when the connection is
opened.
connectionstrings.com gives the following:
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\MyExcel.xls;Extended
Properties="Excel 8.0;HDR=No;IMEX=1";
I've tried including the "Extended Properties=" and tried most permuations
of quote marks and Chr(32) - all just make the VBA stop in its tracks rather
than crashing Excel.
Anyone got any ideas? Do I need a different connection string for Excel 2003?