trapper and kedaman I have to disagree. A form will not be loaded if all you do is refer to one of the properties you add. Try it yourself. Create a project with two forms. Put the following code in form2.
and put a command button on Form1 with the following code.Code:Option Explicit Private mName As String Public Property Get NickName() As String NickName = mName End Property Public Property Let NickName(ByVal sNM As String) mName = sNM End Property
When the button is clicked, Form2 is not loaded, but "Marty" will be displayed.Code:Private Sub Command1_Click() Form2.NickName = "Marty" MsgBox Form2.NickName End Sub




Reply With Quote