Results 1 to 2 of 2

Thread: Pls Help

  1. #1

    Thread Starter
    Addicted Member MrPresident2k's Avatar
    Join Date
    May 2002
    Location
    INDIA
    Posts
    167

    Pls Help

    Hi,
    Thanks in advance for the help.

    Iam having an AvtiveX control and a Form. Now I have to Acess the Control's properties and methods from the Form.

    I used

    Dim a as UserControl

    Private Sub Form_Load()
    Set a = new UserControl1
    a.MethodName
    End Sub

    But this doesn't work and gives an error.
    How to create the Object of ActiveX control in the form?

    Pls Help.

  2. #2
    -= B u g S l a y e r =- peet's Avatar
    Join Date
    Aug 2000
    Posts
    9,629
    I'm sorry for beeing so sloooow, but if you have added a control to your form, you can reference the control directly, without creating the control as an object.

    example

    I create a usercontrol. Its named peet
    I add peet to a form

    I now have peet1 on my form

    inside peet1, I have a public methode or prop called TestThis
    in order to use this, I do something like this in my form

    VB Code:
    1. Private Sub Form_Load()
    2.   MsgBox peet1.TestThis(sTestParameter)
    3. End Sub

    I do not have to create an object of type peet

    If I totally misunderstood you, please explain further
    -= a peet post =-

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