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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Accessing Activex DLL from vbscript

Status
Not open for further replies.

TomKane

Programmer
Jul 24, 2001
1,018
0
0
AU
Hello,

I have a query relating to activex and vbscript and would appreciate any advice you might have.

We're starting to do a bit of activex in our apps. It's a bit of a transitional stage, so we're looking to invoke these DLLs using VBScript.

The things I'm unsure about are:

How do I get 'createobject' to pinpoint the DLL i'm looking for

Can I make the assumption that if an activex dll works in vb then it is bound to work in vbscript

Thanks in advance

Tom
 
Well I did it - it would seem as if the fact that the dll is registered on the PC is good enough. I got the dll to interact with the code below:

Dim x

Set x = CreateObject("ThingDemo.Thing")

x.getRecordSetup

Do While Not x.adoRs.EOF
if not isnull(x.adors("Name")) then
msgbox x.adors("Name")
end if
x.adoRs.MoveNext
Loop
 
Hi,
Since this works for you when you write the ActiveX component, how do you figure out something when you can't find the docs for the ActiveX component. For example, I found out that indeed a registered component (IBM's Personal Communcations) was registered (and when I spelled it correctly) the createobject worked. Now, how do I tell it to enter a command. I need to change the mainframe password for a user so that they don't have to know how to sign-on and do it themselves.

TasMOt
 
TasMot,

I think what you can do is, if you reference the component in a vb app, you can use the intellisense to see what the functions and variables are.

Hope this helps,

Tom
 
Tom,
Thanks, where I ran into problems was that I did not know how to do that in VB. After somebody showed me how to do that I started making progress.

TasMot
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top