Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Ramana,
I just thought of this. If you look at Excel's Insert Cells... dialog box, you are forced to use arrow keys to navigate the option buttons. If you use tab, it goes to Ok, Cancel, then back to the one option button that is true, whichever that is. So I tried to emulate that. We'll use option buttons opt1, op2, opt3 on userform1 Userform1_Initialize() opt1.tabstop = true opt2.tabstop = false opt3.tabstop = false End sub opt1_change() if opt1 = true then opt1.tabstop = true if opt1 = false then opt1.tabstop = false End sub opt1_enter() opt1 = true End Sub opt2_change() if opt2 = true then opt2.tabstop = true if opt2 = false then opt2.tabstop = false End sub opt2_enter() opt2 = true End Sub opt3_change() if opt3 = true then opt3.tabstop = true if opt3 = false then opt3.tabstop = false End sub opt3_enter() opt3 = true End Sub Use tab to enter the opt1, use the arrows to choose which opt you want, you can then safely use tab to leave. Dave "Ramana" wrote: Hi, In my user form, while navigating between option buttons, the focus is moving to the new option buttons but the new option is not getting selected unless I press space bar. Please see the attached excel file. Any clue? Advance Thanks, Ramana |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Dave,
Thanks for your help. Your solution works fine. Thanks, Ramana "drhalter" wrote in message ... Ramana, I just thought of this. If you look at Excel's Insert Cells... dialog box, you are forced to use arrow keys to navigate the option buttons. If you use tab, it goes to Ok, Cancel, then back to the one option button that is true, whichever that is. So I tried to emulate that. We'll use option buttons opt1, op2, opt3 on userform1 Userform1_Initialize() opt1.tabstop = true opt2.tabstop = false opt3.tabstop = false End sub opt1_change() if opt1 = true then opt1.tabstop = true if opt1 = false then opt1.tabstop = false End sub opt1_enter() opt1 = true End Sub opt2_change() if opt2 = true then opt2.tabstop = true if opt2 = false then opt2.tabstop = false End sub opt2_enter() opt2 = true End Sub opt3_change() if opt3 = true then opt3.tabstop = true if opt3 = false then opt3.tabstop = false End sub opt3_enter() opt3 = true End Sub Use tab to enter the opt1, use the arrows to choose which opt you want, you can then safely use tab to leave. Dave "Ramana" wrote: Hi, In my user form, while navigating between option buttons, the focus is moving to the new option buttons but the new option is not getting selected unless I press space bar. Please see the attached excel file. Any clue? Advance Thanks, Ramana |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
selecting using option buttons in excel | Excel Worksheet Functions | |||
Option Buttons | Excel Discussion (Misc queries) | |||
Option Buttons | Excel Discussion (Misc queries) | |||
Navigating between option buttons is not selecting the option | Excel Programming | |||
Option Commands (Option Explicit / Option Base etc) - Scope | Excel Programming |