|
-
Jun 4th, 2002, 04:29 AM
#1
Thread Starter
Addicted Member
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.
-
Jun 4th, 2002, 04:41 AM
#2
-= B u g S l a y e r =-
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:
Private Sub Form_Load()
MsgBox peet1.TestThis(sTestParameter)
End Sub
I do not have to create an object of type peet
If I totally misunderstood you, please explain further
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|