473,405 Members | 2,167 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

missing or broken reference 'EXCEL.EXE' version 1.6

Nathan H
104 100+
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?
Nov 30 '07 #1
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 ...
Dec 1 '07 #2
Nathan H
104 100+
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
Dec 5 '07 #3
MMcCarthy
14,534 Expert Mod 8TB
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
Dec 11 '07 #4
MMcCarthy
14,534 Expert Mod 8TB
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?
Dec 11 '07 #5
Nathan H
104 100+
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
Dec 11 '07 #6
MMcCarthy
14,534 Expert Mod 8TB
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.
Dec 11 '07 #7
Nathan H
104 100+
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...

Expand|Select|Wrap|Line Numbers
  1. Private Sub cmdTEST_Click()
  2. On Error GoTo NORECORD
  3.  
  4. Dim objExcel As Excel.Application, strExcelPath As String
  5. Set objExcel = New Excel.Application
  6. strExcelPath = objExcel.Path & "\"
  7. Debug.Print strExcelPath
  8. Set objExcel = Nothing
  9. Dim FullExcelPath As String
  10. FullExcelPath = (strExcelPath & "excel.exe")
  11.  
  12. DoCmd.SetWarnings False
  13. DoCmd.OpenQuery "qryTEST"
  14. DoCmd.OutputTo acOutputTable, "tblTEST", "*.xls", "C:\Test\data\test.xls", False
  15.  
  16. Call Shell(FullExcelPath & " ""C:\test\test.xls""", 1)
  17. txtLOC.Value = "Test Query Completed ---" & FullExcelPath
  18. Exit Sub
  19.  
  20. NORECORD:
  21. MsgBox "The query returned no records.  Please reformat your search criteria.", vbOKOnly, "NB"
  22.  
  23. End Sub
  24.  
  25.  
Jan 5 '08 #8
FishVal
2,653 Expert 2GB
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?
Jan 5 '08 #9
ADezii
8,834 Expert 8TB
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...

Expand|Select|Wrap|Line Numbers
  1. Private Sub cmdTEST_Click()
  2. On Error GoTo NORECORD
  3.  
  4. Dim objExcel As Excel.Application, strExcelPath As String
  5. Set objExcel = New Excel.Application
  6. strExcelPath = objExcel.Path & "\"
  7. Debug.Print strExcelPath
  8. Set objExcel = Nothing
  9. Dim FullExcelPath As String
  10. FullExcelPath = (strExcelPath & "excel.exe")
  11.  
  12. DoCmd.SetWarnings False
  13. DoCmd.OpenQuery "qryTEST"
  14. DoCmd.OutputTo acOutputTable, "tblTEST", "*.xls", "C:\Test\data\test.xls", False
  15.  
  16. Call Shell(FullExcelPath & " ""C:\test\test.xls""", 1)
  17. txtLOC.Value = "Test Query Completed ---" & FullExcelPath
  18. Exit Sub
  19.  
  20. NORECORD:
  21. MsgBox "The query returned no records.  Please reformat your search criteria.", vbOKOnly, "NB"
  22.  
  23. End Sub
  24.  
  25.  
  1. How abouot code similar to this in the Open() Event of your Main Form to explicitly check for an Excel Reference?
    Expand|Select|Wrap|Line Numbers
    1. Private Sub Form_Open(Cancel As Integer)
    2. Dim ref As Reference, blnExcelIsReferenced As Boolean, strMsg As String
    3.  
    4. Msg = "A Required Reference to the Excel Object Library is MISSING!"
    5.  
    6. For Each ref In Application.References
    7.   If ref.Name = "Excel" Then
    8.     blnExcelIsReferenced = True
    9.   Else
    10.     blnExcelIsReferenced = False
    11.   End If
    12. Next
    13.  
    14. If Not blnExcelIsReferenced Then
    15.   MsgBox Msg, vbCritical, "Missing Excel Reference"
    16.     'Exit Main Form but stay in Access to fix
    17.     Cancel = True
    18. End If
    19. End Sub
  2. 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?
    Expand|Select|Wrap|Line Numbers
    1. Dim objExcel As Excel.Application, strExcelPath As String
    2. Set objExcel = New Excel.Application
    3.  
    4. objExcel.Visible = True
    5.  
    6. DoCmd.SetWarnings False
    7.   DoCmd.OpenQuery "qryTest"
    8.   DoCmd.OutputTo acOutputTable, "tblTEST", "*.xls", "C:\Test\Data\Test.xls", False
    9. DoCmd.SetWarnings True
    10.  
    11. objExcel.Workbooks.Open ("C:\Test\Data\Test.xls")
Jan 5 '08 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

3
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...
4
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...
2
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...
3
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...
2
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...
1
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...
6
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...
4
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:...
0
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...
0
BarryA
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
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...
0
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...
0
marktang
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,...
0
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...
0
tracyyun
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...
0
agi2029
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,...
0
isladogs
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.