|
-
Nov 23rd, 2002, 06:58 PM
#1
Thread Starter
New Member
passing an object to reference
I'm trying to do this exactly:
ActiveX control:
Private m_TargetObject As Object
Public Property Let TargetObject (ByRef New_TargetObject As Object)
Set m_TargetObject = New_Target
End Property
Compile The Controll . . .
Standard Exe:
Private Sub Command1_Click()
UserControl.TargetObject = Form2 'This one works
End Sub
Private Sub Command2_Click()
UserControl.TargetObject = Picture1 'This one does not work
End Sub
Why can I pass a form by reference to the control, but not any other types of controls? I get RunTime Error 450: Invalid number of arguments or invalid property assignment.
-
Nov 24th, 2002, 01:02 AM
#2
Lively Member
change the property from "let" to "set"
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
|