We help IT Professionals succeed at work.

ActiveX component can't create object

dr_linux
dr_linux asked
on
982 Views
Last Modified: 2012-05-11
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

Comment
Watch Question

CERTIFIED EXPERT
Most Valuable Expert 2011
Top Expert 2015

Commented:
Did you use the 64-bit version of regsvr to register?

Author

Commented:
Yes, did that, same issue.
CERTIFIED EXPERT
Most Valuable Expert 2011
Top Expert 2015

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  = )
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
Found the better solution that works, called an Access Add-In.
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.