Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access thread: ActiveX 429 error


Message #1 by "Tim Maher" <tim.maher@s...> on Fri, 14 Feb 2003 12:01:47 +0000
Hi,

when trying to create an Excel object fom access I get the following
error :

Runtime error 429 : ActiveX cant create object.

the error falls on the following line

Set xlApp1 = CreateObject("Excel.Application")    
<------------------error here 
Set xlBook1 = xlApp1.Workbooks.Open(second_save_string)

any ideas

tim
This e-mail transmission is strictly confidential and intended solely 
for the person or organisation to who it is addressed.  It may contain 
privileged and confidential information and if you are not the 
intended recipient, you must not copy, distribute or take any action 
in reliance on it.  
If you have received this email in error, please notify us as soon as 
possible and delete it.
This e-mail has been scanned using Anti-Virus software, however, 
Swansea NHS Trust accept no responsibility for infection caused by 
any virus received on the recipients system.



Message #2 by cheriot@m... on Mon, 17 Feb 2003 18:31:23
You must be missing a registry entry for Excel or the current user account 
doesn't have permission to use Excel.

Try early binding to resolve this issue.
Open up the references from the tools menu in a module
Add a reference for "Microsoft Excel <version> Object Library"
Comment out your object declarations and replace with;

Dim xlApp As Excel.Application
Dim xlWksheet As Excel.Worksheet

Set xlApp = New Excel.Application
Set xlWksheet = New Excel.Worksheet
etc

Because you have declared the reference the code and references will be 
compiled and run before the module or form they are in is run.
This type of coding is much more efficient than late binding 
(createobject) and will allow you to use auto complete when coding

If you don't have a reference relating to Excel your code will never work 
whether late or early bound.

Regards



> Hi,

when trying to create an Excel object fom access I get the following
error :

Runtime error 429 : ActiveX cant create object.

the error falls on the following line

Set xlApp1 = CreateObject("Excel.Application")    
<------------------error here 
Set xlBook1 = xlApp1.Workbooks.Open(second_save_string)

any ideas

tim
This e-mail transmission is strictly confidential and intended solely 
for the person or organisation to who it is addressed.  It may contain 
privileged and confidential information and if you are not the 
intended recipient, you must not copy, distribute or take any action 
in reliance on it.  
If you have received this email in error, please notify us as soon as 
possible and delete it.
This e-mail has been scanned using Anti-Virus software, however, 
Swansea NHS Trust accept no responsibility for infection caused by 
any virus received on the recipients system.




  Return to Index