You can create public variables and put the data in them, like this
Form1 Code
In a moduleVB Code:
Private Sub Command1_Click() strName = Text1.Text Form2.Show End Sub Private Sub Form_Load() Text1.Text = "Enter your name.." Text1.SelStart = 0 Text1.SelLength = Len(Text1.Text) End Sub
Form2 codeVB Code:
Public strName As String
VB Code:
Private Sub Form_Load() Label1.Caption = "Your name is " & strName End Sub




Reply With Quote