|
-
Aug 22nd, 2001, 12:28 PM
#1
Thread Starter
Lively Member
CreateObject ???? HELP!!
I have a DLL that I want accessible using CreateObject("Class...."). I can get the DLL to work if I set a reference in VB and it works fine, however, I need the DLL accessible with VBScript as well. Does anyone know of a tutorial or a quick and easy way to set up a DLL that can be utilized with the CreateObject function? I need it to look something like this
set MyObj = CreateObject("MyDLL...")
MyObj.Property1 = "Hello"
MyObj.Property2 = "World!"
MsgBox MyObj.Property1 & " " & MyObj.Property2
Set MyObj = Nothing
-
Aug 24th, 2001, 02:13 PM
#2
Frenzied Member
Just go to VB5 or 6, create a new DLL project, and mess with the class, add the functions etc you need. Compile it and put it where it needs to be.
Go to your VBScript and type
Set obj = CreateObject("ProjectName.ClassName")
So if your project name is "Joe" and the Class name is "Fred" then you type
Set obj = CreateObject("Joe.Fred")
You're ready to roll!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|