Thread: Help with code
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
JMay JMay is offline
external usenet poster
 
Posts: 468
Default Help with code

When I click my cb1 (below) my cursor jumps inside tb1 - FINE OK

Private Sub CommandButton1_Click()
Worksheets("Sheet1").TextBox1.Activate
End Sub

But If I type Mary -- nothing happens << but should get message


Private Sub TextBox1_Change()
If Not Left(Worksheets("Sheet1").TextBox1.Text, 1) = "A" Or
Left(Worksheets("Sheet1").TextBox1.Text, 1) = "B" Then
MsgBox "Text Input must begin with either an ""A"" or ""B"", Try Again"
End If
TextBox1.Text = ""
End Sub