Solved

Excel Object Reference

Posted on 2004-09-24
2
224 Views
Last Modified: 2010-05-02
Hi
my project was running perfectly.
I installed the windows Service Pack2.
Now I tried to run my program again and it tells me that Excel Object reference is missing.
But under Project/Reference this has been ticked.

Now I made a new project and i donot receive this error.

How can I upgrade my old project.

thanks a lot.
0
Comment
Question by:SindhujaCheema
2 Comments
 
LVL 14

Accepted Solution

by:
aelatik earned 125 total points
ID: 12141004
Open your VB project > Reselect the reference and compile it again.

But a better solution would be to use late binding instead of early binding.
The benefit of late binding is that it does not check for the exact version you referenced.

For example, if you declare the object like this :

Dim XXX as NEW Excel.Application

then change it to

Dim XXX
Set XXX = CreateObject("excel.application")
0
 

Author Comment

by:SindhujaCheema
ID: 12141286
Thank you very much.
it works now.
I am using late binding as suggested by u.
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Validating VB6 Function 19 65
VBA: Select SQL query based on a config Sheet v2 11 49
Search combo error "Data Type Mismatch in Criteria Expression" 2 68
MsgBox 4 68
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question