Code to tab from option button click

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
 
G

Glen Millar

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
 
B

Bob Kilmer

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top