Automation Error (with code)
So, for one user, the code fails on the open method for
the connection object (.Open line below), but for a
different user, it works just fine. Both users have the
XP operating system and Office 2002. Both users have the
same version of MDAC (2.7) and the same references checked
(Microsoft ActiveX Data Objects 2.7 Library, Microsoft
Forms 2.0 Object Library, Microsoft Office 10.0 Object
Library, OLE Automation, Microsoft Excel 10.0 Object
Library and Visual Basic for Applications). Any ideas for
me?
Dim cn As ADODB.Connection
Set cn = New ADODB.Connection
With cn
.Provider = "Microsoft.Jet.OLEDB.4.0"
.ConnectionString = sName & _
"Extended Properties=Excel 8.0;"
.Open
End With
-----Original Message-----
Suggest you post a chunk of the code - indicating which
line it is failing on
.
|