View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default TextBox Focus

That answered one question out of 3.

if you are executing the code from a command button , change the
takefocusonclick property to false

if from any other activeX control try

Private Sub ControlName_Click()
ActiveCell.Activate
If Sheet1.TextBox1.Value = "" Then
MsgBox "Please enter a name"
Sheet1.TextBox1.Activate
End If
End Sub

--
Regards,
Tom Ogilvy

"René" wrote in message
...
Thanks again Tom, the version of Excel that I'm using is 97.