Home > Software engineering >  Vb refer to excel automation error - 2147024156 (800702 e4)
Vb refer to excel automation error - 2147024156 (800702 e4)

Time:09-18




Function is open the excel, read data calculation, this program can be run on another computer, but I'm not, have been automated error, reference is 12.0 library, office is 2007, the system is win10, vb6 is not installed successfully, but you can use, found a circle on the net also didn't solve, a great god genuflect is begged

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
Under win64 a system set up 32-bit programs use a database alias to c: \ Windows \ \ syswow64 \ cliconfg exe
Under win64 a system set up a 32-bit application system DSN to c: \ Windows \ \ syswow64 \ odbcad32 exe
A 64 - bit Windows platform attention point of the file system redirection http://www.cnblogs.com/jiake/p/4981555.html
64 - bit Windows platforms attention point of the registry to redirect http://www.cnblogs.com/jiake/p/4956218.html

Suggest to install both 32-bit and 64 - bit Excel at the same time

CodePudding user response:

What I do is 32-bit excel, I try to install a 64 - bit, thank you very much!

CodePudding user response:

Suggest the landlord to reinstall the Office, the Office has a problem, maybe you

I have a software, can use Excel object to load or output data,
Regardless of Office is a 64 - bit or 32-bit, can create objects correctly, and related operations,

CodePudding user response:

My program, there is no reference to the Office of the TLB, directly use CreateObject () or GetObject () by Excel. Application object,
And then through the object access workbook object, work table objects, such as

From Office to Office 2010 2003 were tested in the environment, are all compatible,

CodePudding user response:

Above Windows 7 system have administrator privileges, you are not allowed to call an external application, the solution is an administrator to run the VB, VB generated applications also call an external application can be run as an administrator,

CodePudding user response:

Need to modify a few dim statement,
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,
  •  Tags:  
  • VBA
  • Related