• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 958
  • Last Modified:

ActiveX component can't create object

I am using MS Access 2007 VBA to call a .NET DLL that has been made visible to COM and properly registered and strongly signed.  I followed the example givin at http://www.geeksengine.com/article/create-dll.html

I created the .DLL using Visual Studio 2010

I've made the reference in the VBA code AND VBA intellisense picks up the reference just fine for my class.  I've attached the code that I am using, which is a direct paste from the website above.

Upon running the code I get
Run-time error '429':
ActiveX component can't create object

offending line of code is...
Set objCalc = New SimpleCalc.Calc

After MUCH searching I've narrowed down to what seems to be a Windows 7 64bit type of issue.

I am in fact running Windows 7 64 bit.  Can anybody get this example working (from the website above) using Windows 7 64 bit, Visual Studio 2010 and Access 2007?

Am I out of luck?


Private Sub Command0_Click()
    
    Call test
    
End Sub

Public Function test()
    Dim lngResult As Long
    
    Dim objCalc As SimpleCalc.Calc
    Set objCalc = New SimpleCalc.Calc
    
    objCalc.SetNumberOne (3)
    objCalc.SetNumberTwo (6)
    
    lngResult = objCalc.Add()
        
End Function

Open in new window

0
dr_linux
Asked:
dr_linux
  • 3
  • 2
1 Solution
 
käµfm³d 👽Commented:
Did you use the 64-bit version of regsvr to register?
0
 
dr_linuxAuthor Commented:
Yes, did that, same issue.
0
 
käµfm³d 👽Commented:
I'm not within reach of my 64-bit Win 7 machine, but I will have access later tonight. If you haven't received an answer by then, I'll do some investigation  = )
0
 
dr_linuxAuthor Commented:
Actually I found what I've been meaning to do all along, and that is to make an Add-In.  Don't know why I didn't realize that sooner.

http://msdn.microsoft.com/en-us/library/aa902693%28v=office.12%29.aspx
0
 
dr_linuxAuthor Commented:
Found the better solution that works, called an Access Add-In.
0

Featured Post

Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now