AnsweredAssumed Answered

visual basic .net activeX error

Question asked by pauld on Aug 8, 2007
Latest reply on Aug 8, 2007 by pauld
Hey Guys,

I'm working on a visual basic .net application that will help me automate a few things with my E8364B PNA.

The problem I have occurs when I try and create any object other than a .Application.  For example, this code will error at the cal = CreateObject(...)

    Dim cal As AgilentPNA835x.Calibrator
    cal = CreateObject("AgilentPNA835x.Calibrator", "\\G150-pna1")

But if I just switch .Calibrator with .Application then everything runs great and I can execute all the methods in the AgilentPNA835x DLL/Reference.

This is the error that pops up with .Calibrator:  Unhandled exception has occurred... cannot create ActiveX component.

************** Exception Text **************
System.Exception: Cannot create ActiveX component.
   at Microsoft.VisualBasic.Interaction.CreateObject(String ProgId, String ServerName)
   at PNA_IsoSetupInit.Form1.Button4_Click(Object sender, EventArgs e) in C:\Documents and Settings\pdorner\My Documents\Visual Studio 2005\Projects
...
************** Loaded Assemblies **************
...
Interop.AgilentPNA835x
    Assembly Version: 1.9.0.0
    Win32 Version: 1.9.0.0

Hope that gives you guys enough info to go off of.  I would think the problem is with the AgilentPNA835x reference although I don't understand how it could work for one object but none of the others.  To get the 835x DLL I copied pnaproxy.exe from the PNA and installed it on my local computer.  I'm writing the code with MS VB Express 2005.

Any ideas?  Thanks,
-Paul  

Attachments

Outcomes