Re: Property on UserControl
One way is to give the form your calling a property which contains a reference to the usercontrol so your button click might look like:
private Sub Button_Click()
set form1.ownercontrol = usercontrol
form1.show
end sub
then your form could reference it like:
me.ownercontrol.(whateveryouneedtodohere....)
Re: Property on UserControl
Hi,
I did a smiple test as following. The property on the UserControl is TestName, and I can refer it on the test form.
============
'in the Active Control form
Option Explicit
Private mstrName As String
Private Sub Command1_Click()
MsgBox "Hello"
End Sub
Public Property Let TestName(strName As String)
mstrName = strName
End Property
Public Property Get TestName() As String
TestName = mstrName
End Property
===
'In the test from
Private Sub Form_Load()
UserControl11.TestName = "aaa"
End Sub
=======
Regards,
Michi