Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ActiveX - 3rd party control gives error 424 'Object required' 1

Status
Not open for further replies.

mermaidsa

Technical User
Nov 18, 2002
8
ZA
Product installed OK but gives this error when I call it in VBA module. The author of the control thinks I have a registry problem, but I have unregistered and reregistered as well as rebooted (many times!) I have rebuilt 98SE and reinstalled Access (I even bought a new PC!), but the problem still persists. Any ideas what I can try next?

 
The 'Object required' message typically means that you have not instantiated the ActiveX object before you use it. It's like trying to read from a file before you open it. You'll get an error.

Your ActiveX product developer should have provided you with some documentation about how to include the ActiveX object in your program's list of references, how to instantiate it (set up a working copy of the object, similar to opening a file), and how to use the object's properties, methods, and events once it's set up.
 
Thanks for the reply. The activex wraps MSComm to enable it to run in VBA. The properties are those of MSComm. The reference is checked and the control is registerd, but I still get the error. Any more thoughts? Is there any way of ascertaining the precise object (or underlying dll etc.) that is required?
 
In VB/VBA there are typically two ways to instantiate an object. One way is to drag/place a copy of a component from the Toolbox components list onto a form. A good example of this is to put a TreeView or ListView control on a form. Then, you can reference that object's properties and methods by its name as defined on the form.

A second way to instantiate objects is in code. For example, let's say that you are using the API to WinFax Pro. You would need to include the WinFax Automation Server (WFXCTL32.TLB) in your program's References. Then, you might use code like the following to instantiate a copy of the Send object:
Code:
Dim objSend As Object

Set objSend = CreateObject("WinFax.SDKSend")
Once the object is set up you can use its properties and methods.

Which method does your ActiveX wrapper for MSCOMM use?
 
The mscomm wrapper uses the first way. AND my problem was that I was NOT using name defined on the form, but the name provided in the documentation. I know that might seem obvious to many out there. But I tend to believe documentation (foolish person I hear you say!) Anyway many thanks for helping to solve this annoying problem.

Geoff R - South Africa
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top