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
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
Hi,
have you looked at the tab order? just a thought
J
"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
>
>
>
Tab order is correct.
Tab order only controls the sequence of navigation. Here the navigation is
working fine as the focus is chaning properly, but the option is set.
Thanks,
Ramana
"Gixxer_J_97" <[email protected]> wrote in message
news:[email protected]...
> Hi,
>
> have you looked at the tab order? just a thought
>
> J
>
> "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
> >
> >
> >
when you say its not getting selected you mean it's not getting 'pressed'
unless you press the spacebar?
"Ramana" wrote:
> Tab order is correct.
> Tab order only controls the sequence of navigation. Here the navigation is
> working fine as the focus is chaning properly, but the option is set.
>
> Thanks,
> Ramana
>
> "Gixxer_J_97" <[email protected]> wrote in message
> news:[email protected]...
> > Hi,
> >
> > have you looked at the tab order? just a thought
> >
> > J
> >
> > "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
> > >
> > >
> > >
>
>
>
You could try this:
OptButton1_Enter()
OptButton1 = True
End Sub
OptButton2_Enter()
OptButton2 = True
End Sub
I have this code on one of my forms and it works fine. I do find it a
little annoying that the option I want to set doesn't stay if I have to tab
through all of the options. For example, if I start at OptButton1 and set it
true, then tab through OptButton2, I always have to go back and reset
OptButton1, then use the mouse or an accelerator key to avoid setting the
focus on OptButton2 in order to avoid setting it to true.
Good luck
Dave
You are right.
After adding the code, we can not navigate using Tab.
Its very annoying that option buttons that Microsoft uses in Office
applications works correctly.
Thanks,
Ramana
"drhalter" <[email protected]> wrote in message
news:[email protected]...
> You could try this:
>
> OptButton1_Enter()
> OptButton1 = True
> End Sub
>
> OptButton2_Enter()
> OptButton2 = True
> End Sub
>
> I have this code on one of my forms and it works fine. I do find it a
> little annoying that the option I want to set doesn't stay if I have to
tab
> through all of the options. For example, if I start at OptButton1 and set
it
> true, then tab through OptButton2, I always have to go back and reset
> OptButton1, then use the mouse or an accelerator key to avoid setting the
> focus on OptButton2 in order to avoid setting it to true.
>
> Good luck
>
> Dave
>
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
>
>
>
Hi Dave,
Thanks for your help. Your solution works fine.
Thanks,
Ramana
"drhalter" <[email protected]> wrote in message
news:[email protected]...
> 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
> >
> >
> >
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks