Private Sub TextBox1_Change()
If Right(TextBox1.Value, 1) = " " Then
TextBox1.Value = Left(TextBox1.Value, Len(TextBox1.Value) - 1)
TextBox2.SetFocus
End If
End Sub
Private Sub TextBox2_Change()
If Right(TextBox2.Value, 1) = " " Then
TextBox2.Value = Left(TextBox2.Value, Len(TextBox2.Value) - 1)
Range("A1") = TextBox1.Value
Range("B1") = TextBox2.Value
Unload Me
End If
End Sub