Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Code to tab from option button click

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Code to tab from option button click

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 Millar" <glen @ powerpointworkbench.com wrote in message
...
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




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 71
Default Code to tab from option button click

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

"Glen Millar" <glen @ powerpointworkbench.com wrote in message
...
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 Millar" <glen @ powerpointworkbench.com wrote in message
...
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






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Code to tab from option button click

Thanks, Bob. I'll chase up the SetFocus.


--

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

"Bob Kilmer" wrote in message
...
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

"Glen Millar" <glen @ powerpointworkbench.com wrote in message
...
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 Millar" <glen @ powerpointworkbench.com wrote in message
...
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








Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Click Option Button 2x in a Row opieandy Excel Discussion (Misc queries) 2 July 5th 09 10:19 PM
Option Button code not working Sara Excel Discussion (Misc queries) 3 November 12th 08 06:09 PM
right-click on a control button and view code does nothing Kate Excel Worksheet Functions 11 November 16th 07 12:24 AM
keep source formatting is not an option in paste option button Tina Excel Discussion (Misc queries) 0 February 20th 06 09:58 PM
Running command button click event code Marishah Warren Excel Programming 1 December 31st 03 07:53 AM


All times are GMT +1. The time now is 04:38 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"