Results 1 to 3 of 3

Thread: It's easy but i can't ( i think )

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Nov 2000
    Location
    Guadalajara, Jalisco, Mex
    Posts
    105

    It's easy but i can't ( i think )

    Hi all

    I have a Standar EXE project ( called MyProject ), with a class module. (
    called MyClass ).

    When I do this:

    Dim MyObject as MyClass
    set MyObject = New MyClass

    Everithing is fine.

    But when i do this

    Dim MyObject as Object
    set MyObject = CreateObject("MyClass")

    Or

    Dim MyObject as Object
    set MyObject = CreateObject("MyProject.MyClass")

    I get an error. Why ?


    Thanks !!

  2. #2
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    Maybe you can't late bind an object that isn't in a dll. Since its in the exe project maybe it can't be late bound.

  3. #3
    Frenzied Member
    Join Date
    Jul 2002
    Posts
    1,370
    CreateObject looks for the object OUTSIDE your .EXE


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