473,797 Members | 2,955 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Error from Office 2000 to Office XP

I loaded an access application, which was created and runs fine on Office
2000, onto a computer with Office XP. The application creates a run-time
error when running a procedure that creates a new Excel Object. I looked at
the references and the only difference I can find is that on the computer
with 2000 the references is:

Reference: Excel
Location: C:\Microsoft Office\Office\E XCEL9.OLB

on the XP computer the reference is:

Reference: Excel
Location: C:\Microsoft Office\Office10 \EXCEL.EXE

Can anyone help me solve this issue?

Thanks in advance for any help.
Nov 12 '05 #1
3 2693
"NQuinn" <nq****@iciinc. com> wrote in message
news:10******** *****@corp.supe rnews.com...
I loaded an access application, which was created and runs fine on Office
2000, onto a computer with Office XP. The application creates a run-time
error when running a procedure that creates a new Excel Object. I looked at the references and the only difference I can find is that on the computer
with 2000 the references is:

Reference: Excel
Location: C:\Microsoft Office\Office\E XCEL9.OLB

on the XP computer the reference is:

Reference: Excel
Location: C:\Microsoft Office\Office10 \EXCEL.EXE

Can anyone help me solve this issue?

Thanks in advance for any help.

Your're almost there. When you transfer the database to the new machine,
the first thing you should do is to try and compile it - view any code and
chose Debug>Compile. I guess, it will fail on a line like

Dim xlApp As Excel.Applicati on

saying that user-defined type is not defined. When you look at your
refeneces you will see a missing reference to the Excel 9 object library.
Remove this reference and check the box Microsoft Excel 10.0 Object Library
which according to you seems to be in "C:\Microso ft
Office\Office10 \EXCEL.EXE" (whereas on mine it is C:\Program Files\Microsoft
Office\Office10 \EXCEL.EXE). Now try again to compile it and hopefully it
will compile without complaint - If so that's it.

If I am distributing applications to clients I avoid this problem by not
making a reference to any particular version. This is called late binding
as opposed to what you have here - early binding which can cause trouble.
You can search Google for more on this if you are interested in modifying
the code to use late binding.
Fletcher
Nov 12 '05 #2
Thanks for your help. I'm trying this. Is it correct to Dim all my
workbook, worksheet and range variables as "Object"?

"Fletcher Arnold" <fl****@home.co m> wrote in message
news:c0******** **@sparta.btint ernet.com...
"NQuinn" <nq****@iciinc. com> wrote in message
news:10******** *****@corp.supe rnews.com...
I loaded an access application, which was created and runs fine on Office 2000, onto a computer with Office XP. The application creates a run-time error when running a procedure that creates a new Excel Object. I looked
at
the references and the only difference I can find is that on the
computer with 2000 the references is:

Reference: Excel
Location: C:\Microsoft Office\Office\E XCEL9.OLB

on the XP computer the reference is:

Reference: Excel
Location: C:\Microsoft Office\Office10 \EXCEL.EXE

Can anyone help me solve this issue?

Thanks in advance for any help.

Your're almost there. When you transfer the database to the new machine,
the first thing you should do is to try and compile it - view any code and
chose Debug>Compile. I guess, it will fail on a line like

Dim xlApp As Excel.Applicati on

saying that user-defined type is not defined. When you look at your
refeneces you will see a missing reference to the Excel 9 object library.
Remove this reference and check the box Microsoft Excel 10.0 Object

Library which according to you seems to be in "C:\Microso ft
Office\Office10 \EXCEL.EXE" (whereas on mine it is C:\Program Files\Microsoft Office\Office10 \EXCEL.EXE). Now try again to compile it and hopefully it
will compile without complaint - If so that's it.

If I am distributing applications to clients I avoid this problem by not
making a reference to any particular version. This is called late binding
as opposed to what you have here - early binding which can cause trouble.
You can search Google for more on this if you are interested in modifying
the code to use late binding.
Fletcher

Nov 12 '05 #3
"NQuinn" <nq****@iciinc. com> wrote in message
news:10******** *****@corp.supe rnews.com...
Thanks for your help. I'm trying this. Is it correct to Dim all my
workbook, worksheet and range variables as "Object"?


Yes - If you want to use late binding. The advantage being that you do not
have to worry about what version of Office is installed. This is very
useful if you distribute your application to people who may upgrade their
version of Office or may use different versions. **It may not be worth it
for you.** It might be simpler just to change your references since early
binding does have some advantages:
Code executes faster - but I have not found the speed improvement to be
worth it.
You can use intellisense - but I write the code using early binding so when
you type "wdApp.", you get a very handy dropdown list of the properties and
methods of the Word.Applicatio n object. I then make the minor amendments to
the code to use late binding, then remove the reference.

Another important note: If you switch to late binding you will not be able
to use the built-in constants. That is, you will have to re-define them
yourself. You cannot simply write:

wdCell.Range.Pa ragraphFormat.A lignment = wdAlignParagrap hRight

because wdAlignParagrap hRight is constant defined by the Word object
library, unless you wrote:

const wdAlignParagrap hRight = 2
Here is an example of some late-binding code which I posted earlier today:
Private Sub PrintWord(strPa th As String)

On Error GoTo Err_Handler

Dim wdApp As Object
Dim wdDoc As Object

Set wdApp = CreateObject("W ord.Application ")

Set wdDoc = wdApp.Documents .Open(strPath)

wdDoc.PrintOut False

Exit_Handler:

On Error Resume Next

wdDoc.Close

Set wdDoc = Nothing

wdApp.Quit

Set wdApp = Nothing

Exit Sub

Err_Handler:
MsgBox Err.Description , vbExclamation, "Error No: " & Err.Number
Resume Exit_Handler

End Sub
Nov 12 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
3830
by: Corepaul | last post by:
I am a beginner, using Access 2000. I am having difficulty with the Visual Basic Help. Specifically, using the Index tab, when I enter "OpenRecordset" in the keyword field and click the Search button, 18 topics are displayed. But when I click (or double click) on a topic, the information display does not change. This is the only keyword I have found that does this, the others I have used work fine. Unfortunately, I need help on this...
5
2989
by: Don Kuykendall | last post by:
I have Office 2000 and Office Developer and I want to upgrade to Office XP. Will my copy of Office Developer work with Access XP?
0
1447
by: Jim | last post by:
Hello, I am maintaining an Access 2000 database for many users that uses an image control to display JPG, GIF and PNG files. One and only one user in particular continues to get an error message of "The PhotoDraw MIX file import filter couldn't load. Try reinstalling Microsoft Office to fix this problem." This error happens when the database first starts and everything seems fine thereafter. There was a previous thread on this...
4
4404
by: Aliza Klein | last post by:
Apologies in advance as I am SURE this has been asked 100 times - but I haven't got a simple answer: I have MS Office XP Developer and have created an installation package (with the runtime) for an Access 2002 database. The problem: when installing on a Windows XP machine, I get the following error: The Office System Pack cannot be installed on this system because it
8
3181
by: sudha | last post by:
Hi, To open a word doc from c#, i use the following code : Word.ApplicationClass WordApp = new Word.ApplicationClass (); // give any file name of your choice. object fileName = "C:\\test.doc"; object readOnly = false;
0
2536
by: Erwan | last post by:
I have a strange (but very blocking) result when using the smtpmail class from an ASPX page : here is the (very simple !) code... '-------------------------------------------------- mail.To = "el@illico.fr" mail.From = "el@illico.fr" mail.Subject = "test envoi de mail" mail.Body = "test envoi de mail"
2
1810
by: Nicolas Mailhot | last post by:
Hi, I've been tasked with doing a study of how to migrate our current excel VBA macros (that currently dig in a very insecure and uncontroled way in various corporate databases) to a setup were everything is arbitrated by Weblogic web services (with EAI-provided web services looming on the horizon) The Office version currently deployed on clients Office 2000 on Windows 2000 (+some NT4s).
4
1687
by: Lyle Fairfield | last post by:
I asked this question in Microsoft.Public.Word two days ago but I have not received an answer. I believe there are Office Experts here who may be able to help. --------- "A friend has Office 2000. She is a high school student. English is not her first language. I find the "Lookup" facility in Word 2003 very useful. I think she woud
1
3948
by: Donald Grove | last post by:
I am suddenly getting this message. It happens during code executed from a form module that calls a function stored in a standard module. I am working on a standalone pc with no network connection to anything. After this message, access closes. Then when I go back, all the module have been deleted from the form.\ MS error reporting sends me to a web page that says there isn't a fix for the problem and that I should get Access 2003 (I...
0
9685
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9536
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10245
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10205
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10021
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9063
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7559
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6802
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5582
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.