Home > Software engineering >  Vb call excel prompt automation error, unregistered object library
Vb call excel prompt automation error, unregistered object library

Time:09-21

Wrote a small database Application that invokes the excel display database data, everything is ok on your computer (WIN764, office2010), to the customer service phone error: automation error, object library unregistered error: Set XlsObj=CreateObject (" excel. Application ") 'create excel object
Customer service machine is win732, an lite version, and then I uninstall office, after installing office2010, fault, doubt is the problem of compact edition, online for a long time did not solve, please expert guidance

CodePudding user response:

Should be the problem of the Office 2010,
About a year ago, I met this problem, a program is also thought it was "not compatible",
My Office computer: Win 7 32 bit pro + Office 2007, there is no problem;
Colleagues Office computers: Windows 7 32-bit pro + Office 2010, can't create objects,

The operating system to Win 7 is licensed, Office is piracy (07) is a generic serial number; 10 is a registered machine activation)

But in my own home on a computer (systems, Office, everyone know... ) :
Win 10 (64 edition) + Office 2010 (64), the program is still running normally,
There has been no visible "VB6 can't compatible with Office 2010" problem,

The installation "Office streamline version" of the computer, is not "create objects",
This is no doubt that, because of its "COM component interface" downsized out,
Don't know your "customers" to install Office is 32-bit or 64 - bit, really not you let him install Office 2007 calculate,

CodePudding user response:

Oh, the customer is Windows 7 32 bit, can be to Office 201032,

CodePudding user response:

Now the problem is no matter which version installed prompt object library unregistered, reshipment office, streamlining the com component interface not reinstall? How to reinstall or registered COM component interface?

CodePudding user response:

In a 64 - bit Windows:
64 exe and DLL in the directory c: \ Windows \ sys tem32 directory.
32 bit exe and DLL in the directory c: \ Windows \ sys wow64 directory.
So pay attention to:
In win64 system registered under 32-bit ocx DLL to 32 ocx or copy the DLL to the c: \ Windows \ syswow64 \ directory,
And registered to c: \ Windows \ syswow64 \ regsvr32 XXXXXXX ocx or DLL

CodePudding user response:

Streamline version should be no COM components and the relevant registration information,

You uninstall first and then use the registry tools to clear up the registry, and then restart the computer after installing Office 2007 try,

CodePudding user response:

Like upstairs said are not true,

If you are using is: dim aa as excel. The application, so your application reference is your computer in excel, and libraries are fixed, in vb compile time is fixed,

So, when you write in your computer program can use, so distribution in the program to other computers (mainly office version, etc.), you need to modify the dim,
Is amended as:
Dim aaa as object
Set aaa=createobjec (" excel. Application "), so when compiled exe inside and have no fixed reference, run time system will find a class called excel to load,

The problem there is that in the MSDN, called the early binding and late binding,

In addition, the office provides objects have almost the same interface, so late binding objects to general different office version

CodePudding user response:

It over a few months ago, createobjec (" excel. Application "), does not necessarily useful, lite version a lane, system is not normal,

CodePudding user response:

reference 1st floor Chen8013 response:
should be the problem of the Office 2010,
About a year ago, I met this problem, a program is also thought it was "not compatible",
My Office computer: Win 7 32 bit pro + Office 2007, there is no problem;
Colleagues Office computers: Windows 7 32-bit pro + Office 2010, can't create objects,

The operating system to Win 7 is licensed, Office is piracy (07) is a generic serial number; 10 is a registered machine activation)

But in my own home on a computer (systems, Office, everyone know... ) :
Win 10 (64 edition) + Office 2010 (64), the program is still running normally,
There has been no visible "VB6 can't compatible with Office 2010" problem,

The installation "Office streamline version" of the computer, is not "create objects",
This is no doubt that, because of its "COM component interface" downsized out,
Don't know your "customers" to install Office is 32-bit or 64 - bit, really not you let him install Office 2007 calculate,
+ 1
Basically this problem,

CodePudding user response:

It by Lin who give back the COM interface, such as the normal installation of OFFICE write registry keys, and then lean OFFICE, installation, copy the normal registry keys to come over, then deleted one by one, and again reference, if you try to delete the VB can't open the reference in, that this is a useful,

Anyway, is not a simple thing to do
  • Related