Results 1 to 2 of 2

Thread: How to get the calling forms name from a class?

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 1999
    Location
    ma,usa
    Posts
    485
    Hi,
    I'm new to using classes. I would like to assign the calling form's drawwidth property from within a class, however I don't how to refer to it. I would like to use this class without modification with any form. I've tried "Me" and "ActiveForm" without success. I figured anyone here on a Saturday night must be hardcore enough to answer this. Please help.
    Thanks in Advance,
    Joey O

  2. #2
    Guru Aaron Young's Avatar
    Join Date
    Jun 1999
    Location
    Red Wing, MN, USA
    Posts
    2,177
    Why don't you have the Calling Form pass a reference to itself when calling the Class, i.e

    Code:
    Dim oMyClass As New MyClass
    
    Private Command1_Click()
        Call oMyClass.SetDrawWidth(Me)
    End Sub

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