Selecting a text box

  • Thread starter Thread starter ekreider
  • Start date Start date
E

ekreider

I am wanting to know if there is a way automaticly move to a text box after
selecting a check box or an option button.
example: Click on check box or option buton and the cursor shows up in the
text box automaticly.
 
Hi,

I assume here weree on a worksheet and lets suppose we have a checkbox and a
textbox. In design mode (I used the control toolbox) right click the checkbox
and view code and enter the code below in

Private Sub CheckBox1_Click()
TextBox1.Activate
End Sub

Go back to the worksheet and exit design mode and click your checkbox.

Mike
 
If this is for a UserForm control then this would work

Private Sub CheckBox1_Click()
If CheckBox1 = True Then TextBox1.SetFocus
End Sub
..
 
Back
Top