Finding dll components

K

Kou Vang

How do you find out which dll's contain certain functions in VB or whatever
other programs, that can be brought into the VBA environment?
 
P

Peter

Kou Vang said:
How do you find out which dll's contain certain functions in VB or whatever
other programs, that can be brought into the VBA environment?

I'm not exactly sure what you're looking for, but it's probably one of two things: referencing COM objects in a project, or accessing the Windows API.

If you have a dll that's compiled to be a COM object, you can add it to your VBA project as a reference, then access its methods and properties in your code. In the IDE, Click Tools -> References. Then either find your dll in the list provided, or browse for it in the file system. Once it's added to your project, you can browse the exposed methods, properties, etc... via the Object Browser (F2), or Dim variables as objects of the type(s) exposed by your dll and use IntelliSense to help you program.

If you are wanting to access the Windows API, there are many resources online. I typically google for the functions I need, or look in MSDN, but there are also many good books available.

hth,

-Peter
 
K

Kou Vang

I am specifically trying to find a .dll to use the "ItemData" function. But
am not sure if it is possible to use it within the VBA environment. Is there
a place I can go, to find out what .dll or API's may hold certain functions I
want? Thanks.

Kou
 
P

Peter

Are you wanting to use the ItemData property of a ListBox or ComboBox?
That's not a function, it's a property of a particular object.
In order to use it, you have to use the object, and in order to use the object, you have to add a reference to that object or its parent to your project, and in this case, I really don't think it can be done.

Anyone ever referenced VB6 objects and used them in their projects?

hth,

-Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top