Results 1 to 2 of 2

Thread: Binding/Object Creation Table

  1. #1

    Thread Starter
    Member
    Join Date
    Aug 2000
    Posts
    45
    I've tried to combine what I know about binding and object creation into a table so that I can keep it straight in my somewhat thick head. I've also indicated on which line I believe the object is acutally created.
    Is this correct?:

    'Early Binding #1 (slowest performance of early binding)
    Dim MyClass As New Class1
    MyClass.Size = 0 'Object Created Here

    'Early Binding #2
    Dim MyClass1 As Class1
    Set MyClass1 = New Class1 'Object Created Here
    MyClass1.Size = 1

    'Early Binding #3
    Dim MyClass2 As Class1
    Set MyClass2 = CreateObject("Project1.Class1") 'Object Made
    MyClass2.Size = 2

    'Late Binding (slowest performance overall)
    Dim MyClass3 As Object
    Set MyClass3 = New Class1 'Object Created Here
    MyClass3.Size = 3

    Thanks in advance for any oPiNes. =)
    -Gregg
    -NoOBie At LaRg3

  2. #2
    Guest
    add this to your list:

    Dim MyClass4 As Object
    Set MyClass4 = CreateObject("Project1.Class1")
    MyClass4.Size = 3

    you don't need a reference to the object in your project and it can help you out of version problems.

    best regards

    Sascha


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