Code to tab from option button click

  • Thread starter Thread starter Glen Millar
  • Start date Start date
G

Glen Millar

Hi,

I want it so that if someone selects an option button, the tab key will fire
and automatically select the next option based on tab order. BTW, the next
option is a text box.

Private Sub Sub_Catch_Value_Click()
If Sub_Catch_Value = True Then
RainValue.Value = 0
Application.SendKeys ("TAB")
End If
End Sub

But this does not work. It inputs the data into the text box but does not
then select it for input. There must be a better way?

--

Regards,

Glen Millar
Microsoft PPT MVP
http://www.powerpointworkbench.com/
Please tell us your ppt version, and get back to us here
Remove spaces from signature
Posted to news://msnews.microsoft.com
 
Hi,

Cracked it.:

Application.SendKeys "{TAB}"

The one I had just sends text.

--

Regards,

Glen Millar
Microsoft PPT MVP
http://www.powerpointworkbench.com/
Please tell us your ppt version, and get back to us here
Remove spaces from signature
Posted to news://msnews.microsoft.com
 
Glen,
You can ascertain the tab order and use the SetFocus method of the control
you want to have the focus. Personally, I eschew SendKeys.

Bob
 
Back
Top