Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
I currently have an Excel file that uses a lot of VBA. I'm basically using ADO to run a query. Here's the odd part, we're working on three different computers with different versions of Excel. 1) Excel 2003 SP2 - Windows XP SP1 2) Excel 2003 - Windows XP (not sure of service Pack) 3) Excel 2002 - Windows XP SP2 Here's the thing, the file works fine on 1 & 3. However, on the Excel 2003 without SP2, it does not. I get the following error: "Microsoft jet database engine could not find object 'MyNamedRange'" Any ideas would be much appreciated. Thanks in advance! |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Post the code that is causing the problem
wrote in message oups.com... Hello, I currently have an Excel file that uses a lot of VBA. I'm basically using ADO to run a query. Here's the odd part, we're working on three different computers with different versions of Excel. 1) Excel 2003 SP2 - Windows XP SP1 2) Excel 2003 - Windows XP (not sure of service Pack) 3) Excel 2002 - Windows XP SP2 Here's the thing, the file works fine on 1 & 3. However, on the Excel 2003 without SP2, it does not. I get the following error: "Microsoft jet database engine could not find object 'MyNamedRange'" Any ideas would be much appreciated. Thanks in advance! |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Here is the code. The error happens on the "Call empRS.Open(..." line.
Dim empRS As ADODB.Recordset Dim empSQL As String curConnectionString = _ "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=" & ThisWorkbook.FullName & ";" & _ "Extended Properties=Excel 8.0;" Set empRS = New ADODB.Recordset empSQL = "SELECT DISTINCT " & selColNm & ", " & selColEm & " " & _ "FROM ChartOfAccounts " & _ "WHERE ENTITY = 1;" Call empRS.Open(empSQL, curConnectionString, adOpenForwardOnly, _ adLockReadOnly, CommandTypeEnum.adCmdText) Do While Not empRS.EOF msgbox empRS.Fields(1).Value empRS.MoveNext Loop |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Microsoft Excel import a webpage error | Excel Discussion (Misc queries) | |||
Microsoft Error Report - Excel with VBA | Excel Programming | |||
Error using "IF" in Microsoft Excel | Excel Worksheet Functions | |||
return 0 for error value #N/A in microsoft excel? | Excel Programming | |||
Microsoft Excel Error | Excel Programming |