'Form1' Private Sub Command1_Click() Dim frm2 As New Form2 frm2.MyVar = "String" frm2.Show End Sub 'Form2' Private MyVarInForm2 As String 'Note it is public for the form only!!!' Public Property Let MyVar(ByVal str_val As String) MyVarInForm2 = str_val End Property Private Sub Form_Load() MsgBox MyVarInForm2 End Sub
Welcome to WordPress. This is your first post. Edit or delete it, then start writing!