View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson[_5_] Dave Peterson[_5_] is offline
external usenet poster
 
Posts: 1,758
Default MSG BOX PREVENTS SET FOCUS POST 2

See one alternative at your other post.

helpless in iowa wrote:

If msg box line is removed from code, text box will be the focus and text
selected. With MSG BOX line left in, its like it just skips the focus and
highlight code

Private Sub txtphone_Change()
If Not IsNumeric(txtphone) Then
MsgBox "Must be Numeric"
txtphone.SetFocus
txtphone.SelStart = 0
txtphone.SelLength = 1000
End If

End Sub


--

Dave Peterson