Private Sub Command1_Click() Dim a As String Dim b As String
a = Text1.Text
b = Text2.Text
c = Text1.Text
Form2.Show
End Sub
Private Sub Command2_Click() End
End Sub
Private Sub Form_Load() Text1.Text = "" Text2.Text = ""
End Sub
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 And Text1.Text <> "" Then Text2.SetFocus End If
End Sub
Private Sub Text2_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 And Text2.Text <> "" Then Call Command1_Click
End If
End Sub
有两个窗体 声明一个公共变量 "a","b"两个变量可以不要