Link to home
Start Free TrialLog in
Avatar of dr_linux
dr_linuxFlag for United States of America

asked on

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

Avatar of kaufmed
kaufmed
Flag of United States of America image

Did you use the 64-bit version of regsvr to register?
Avatar of dr_linux

ASKER

Yes, did that, same issue.
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  = )
ASKER CERTIFIED SOLUTION
Avatar of dr_linux
dr_linux
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Found the better solution that works, called an Access Add-In.