I am getting this error when I install an Access 2007 db with the packaged runtime engine on a machine running Office 2003. When I look at the references on the developing PC, the Microsoft Excel Library is listed in the references.
Any ideas how to begin to fix this problem?
9 14469
I have found it is best to use late binding whever possible. The is especially helpful when you have to support multiple versions of Office.
See Early vs Late binding
Hope this helps ...
I have found it is best to use late binding whever possible. The is especially helpful when you have to support multiple versions of Office.
See Early vs Late binding
Hope this helps ...
Still lost...
Excel Object Library in the references...check
Dim appExcel As Excel.Application in the code...check
Working...nope
Still lost...
Excel Object Library in the references...check
Dim appExcel As Excel.Application in the code...check
Working...nope
Hi Nathan
Did you ever get this one figured out ?
I can get some of the other experts to look at it if you didn't. Unfortunately, I don't use the runtime library much so not an area I specialise in :D
Mary
Just a quick note after re-reading your original post. The runtime library is obviously looking for a 2007 Excel reference and not finding it. Can you change the reference in the 2007 application to a 2003 excel library reference before moving it?
Just a quick note after re-reading your original post. The runtime library is obviously looking for a 2007 Excel reference and not finding it. Can you change the reference in the 2007 application to a 2003 excel library reference before moving it?
Hi Mary,
Still working on this problem. You gave me an idea though...I had to add a reference to Excel objects 11 in Access 2007 (it was only giving me objects 12). I will have to test this.
Thanks,
Nathan
Hi Mary,
Still working on this problem. You gave me an idea though...I had to add a reference to Excel objects 11 in Access 2007 (it was only giving me objects 12). I will have to test this.
Thanks,
Nathan
You're welcome, I hope it works out for you.
Still need help with this issue. I thought I had it, but now I don't. I need this code modified to be able to work without any Excel Object Library checked in the references. I have got e-mails about early binding/late binding and all that cool stuff...but it just is not clicking for me. I need to run this on machines with Excel 2002, 2003, and 2007... -
Private Sub cmdTEST_Click()
-
On Error GoTo NORECORD
-
-
Dim objExcel As Excel.Application, strExcelPath As String
-
Set objExcel = New Excel.Application
-
strExcelPath = objExcel.Path & "\"
-
Debug.Print strExcelPath
-
Set objExcel = Nothing
-
Dim FullExcelPath As String
-
FullExcelPath = (strExcelPath & "excel.exe")
-
-
DoCmd.SetWarnings False
-
DoCmd.OpenQuery "qryTEST"
-
DoCmd.OutputTo acOutputTable, "tblTEST", "*.xls", "C:\Test\data\test.xls", False
-
-
Call Shell(FullExcelPath & " ""C:\test\test.xls""", 1)
-
txtLOC.Value = "Test Query Completed ---" & FullExcelPath
-
Exit Sub
-
-
NORECORD:
-
MsgBox "The query returned no records. Please reformat your search criteria.", vbOKOnly, "NB"
-
-
End Sub
-
-
Hi, Nathan.
MS Office usually adds upon installation path to itself to OS PATH variable.
Do you ever need to invoke Excel using full path?
Still need help with this issue. I thought I had it, but now I don't. I need this code modified to be able to work without any Excel Object Library checked in the references. I have got e-mails about early binding/late binding and all that cool stuff...but it just is not clicking for me. I need to run this on machines with Excel 2002, 2003, and 2007... -
Private Sub cmdTEST_Click()
-
On Error GoTo NORECORD
-
-
Dim objExcel As Excel.Application, strExcelPath As String
-
Set objExcel = New Excel.Application
-
strExcelPath = objExcel.Path & "\"
-
Debug.Print strExcelPath
-
Set objExcel = Nothing
-
Dim FullExcelPath As String
-
FullExcelPath = (strExcelPath & "excel.exe")
-
-
DoCmd.SetWarnings False
-
DoCmd.OpenQuery "qryTEST"
-
DoCmd.OutputTo acOutputTable, "tblTEST", "*.xls", "C:\Test\data\test.xls", False
-
-
Call Shell(FullExcelPath & " ""C:\test\test.xls""", 1)
-
txtLOC.Value = "Test Query Completed ---" & FullExcelPath
-
Exit Sub
-
-
NORECORD:
-
MsgBox "The query returned no records. Please reformat your search criteria.", vbOKOnly, "NB"
-
-
End Sub
-
-
- How abouot code similar to this in the Open() Event of your Main Form to explicitly check for an Excel Reference?
-
Private Sub Form_Open(Cancel As Integer)
-
Dim ref As Reference, blnExcelIsReferenced As Boolean, strMsg As String
-
-
Msg = "A Required Reference to the Excel Object Library is MISSING!"
-
-
For Each ref In Application.References
-
If ref.Name = "Excel" Then
-
blnExcelIsReferenced = True
-
Else
-
blnExcelIsReferenced = False
-
End If
-
Next
-
-
If Not blnExcelIsReferenced Then
-
MsgBox Msg, vbCritical, "Missing Excel Reference"
-
'Exit Main Form but stay in Access to fix
-
Cancel = True
-
End If
-
End Sub
- You started off with Automation code to establish the Path to Excel, why not stay with it to Open the Workbook instead of Shelling out?
-
Dim objExcel As Excel.Application, strExcelPath As String
-
Set objExcel = New Excel.Application
-
-
objExcel.Visible = True
-
-
DoCmd.SetWarnings False
-
DoCmd.OpenQuery "qryTest"
-
DoCmd.OutputTo acOutputTable, "tblTEST", "*.xls", "C:\Test\Data\Test.xls", False
-
DoCmd.SetWarnings True
-
-
objExcel.Workbooks.Open ("C:\Test\Data\Test.xls")
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Gary McGill |
last post by:
I have a C# solution with a dozen or so projects. There are references
between the projects, and these were all added as "Project" references.
Everything's been working fine for months, but...
|
by: Oz |
last post by:
This is long. Bear with me, as I will really go through all the convoluted
stuff that shows there is a problem with streams (at least when used to
redirect stdout).
The basic idea is that my...
|
by: Joe Koziatek |
last post by:
My IE6 runs Javascript1.3 but not Javascript1.2
My Windows Version is: Version 5.1 (Build 2600.xpsp_sp2_rtm
040803-2158
My IE6 Version is: Version 6.0.2900.2180.xpsp-sp2_rtm 040803-2158
In...
|
by: S. van Beek |
last post by:
Dear reader,
I still have a problem with my reference libraries.
In my frond end application a check procedure for missing references is
available.
The problem I confronted with is that...
|
by: funkeymonkey |
last post by:
Please Help !
I am problems accessing any 2003 or earlier databases using microsoft office 2007. Every time I try and open a database file I get the message 'Your Microsoft Office Access database or...
|
by: diego |
last post by:
I have the follwing problem. I want to add a reference to an COM-
object ("ek1.exe").
In Excel-VBA it works without any problems.
In MS Visual Studio 2005 VB this doesn't work and I get the...
|
by: Miro |
last post by:
I can run an exe ( and its install ) i have created on my machine.
The exe has a button that populates a dataset and then shoots it to a
crystal report.
But...
Installing the setup.exe on my...
|
by: Miro |
last post by:
<i have also added this reply to the other newsgroup - now that I have
realizd ( and assuming ) it is not a localized error directly to vb.>
I have found this link on the website:...
|
by: abmezenriquez |
last post by:
"Your Microsoft Office Access database or project contains a missing or broken reference to the file 'MSO.DLL' version 2.4"
if the reference is missing or broken, is there any way to put the...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |