Thread: Text Box Focus
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tim Coddington Tim Coddington is offline
external usenet poster
 
Posts: 94
Default Text Box Focus

I have a bunch of option buttons and one text box on a form.
I want only the text box to have focus, so each time a user
clicks on an option button, the button is selected and focus
returns to TextBox1. I could go like ...

Private Sub OptionButton{1 of 20 numbers}_Click()
TextBox1.SetFocus
End Sub

But is there a way to make TextBox1 take focus automatically
so there is not so much repetition of 'TextBox1.SetFocus' in
my code? Perhaps there is a way to disable each option button
from ever getting focus when clicked (and still allow it to be
selected)?