Dim WithEvents myTextBox As VB.TextBox
Private Sub Command1_Click()
'Dim myTextBox As VB.TextBox
Set myTextBox = Me.Controls.Add("VB.TextBox", "myTextBox")
myTextBox.Move Me.Command1.Left - 500, Me.Command1.Top, Me.Command1.Height, Me.Command1.Height
myTextBox.Visible = True
End Sub
Private Sub Command2_Click()
Me.Controls.Remove "mytextBox"
End Sub
Private Sub myTextBox_Change()
Text1.Text = myTextBox.Text
End Sub
'Private Sub myTextBox_Change()
'Print Text1.Text
'End Sub
Private Sub Text1_Change()
End Sub