Results 1 to 2 of 2

Thread: CreateObject ???? HELP!!

  1. #1

    Thread Starter
    Lively Member Nator's Avatar
    Join Date
    Nov 1999
    Location
    East Larryville, GA
    Posts
    80

    Unhappy 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

  2. #2
    Frenzied Member mlewis's Avatar
    Join Date
    Sep 2000
    Posts
    1,226
    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!
    M. Lewis
    Pi-Q Software
    How many mouse clicks does it take to cook breakfast?

    Blargh! I am dead!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width