K
Ken McLennan
G'day there One and All,
I'm back once again =)
I have a userform with 3 togglebuttons - tBtn1, tBtn2, & tBtn3. I'm
trying to get them to work like OptionButtons, unsuccessfully I might
add.
I've tried linking them to 3 separate cells, although I initially got
these results when there were no ControlSources.
I have the following code in the userform's events:
Private Sub tbtn1_Click()
Me.tbtn1.Value = True
Me.tbtn2.Value = False
Me.tbtn3.Value = False
End Sub
Private Sub tbtn2_Click()
Me.tbtn1.Value = False
Me.tbtn2.Value = True
Me.tbtn3.Value = False
End Sub
Private Sub tbtn3_Click()
Me.tbtn1.Value = False
Me.tbtn2.Value = False
Me.tbtn3.Value = True
End Sub
I've found that if I click btn1 it works fine clicking btn2 works OK,
but I can't then go back to btn1. Likewise, btn3 is OK, but I can't then
go back to btn1 or btn2. Once I've clicked the next button, the previous
ones don't change when clicked. I would have thought the above would
just change everything as appropriate (silly me!!)
I've Googled all over the place, and found several entries in a few
forums asking similar questions. The trouble is, that of the questions I
found, none had received a response.
The Help page for ToggleButtons states that I can put them inside a
frame, although it doesn't specify what would change should that happen.
Well, I tried it and found that absolutely bugger all changed. It still
didn't work and didn't give me access to the GroupName property even
though it comes up in the editor's assistant. When I tried GroupName it
generated some kind of assignment error.
Has this matter been resolved anywhere? Is there someway that I can get
my 3 togglebuttons to work like an optiongroup?
See ya & thanks
Ken McLennan
Qld, Australia
I'm back once again =)
I have a userform with 3 togglebuttons - tBtn1, tBtn2, & tBtn3. I'm
trying to get them to work like OptionButtons, unsuccessfully I might
add.
I've tried linking them to 3 separate cells, although I initially got
these results when there were no ControlSources.
I have the following code in the userform's events:
Private Sub tbtn1_Click()
Me.tbtn1.Value = True
Me.tbtn2.Value = False
Me.tbtn3.Value = False
End Sub
Private Sub tbtn2_Click()
Me.tbtn1.Value = False
Me.tbtn2.Value = True
Me.tbtn3.Value = False
End Sub
Private Sub tbtn3_Click()
Me.tbtn1.Value = False
Me.tbtn2.Value = False
Me.tbtn3.Value = True
End Sub
I've found that if I click btn1 it works fine clicking btn2 works OK,
but I can't then go back to btn1. Likewise, btn3 is OK, but I can't then
go back to btn1 or btn2. Once I've clicked the next button, the previous
ones don't change when clicked. I would have thought the above would
just change everything as appropriate (silly me!!)
I've Googled all over the place, and found several entries in a few
forums asking similar questions. The trouble is, that of the questions I
found, none had received a response.
The Help page for ToggleButtons states that I can put them inside a
frame, although it doesn't specify what would change should that happen.
Well, I tried it and found that absolutely bugger all changed. It still
didn't work and didn't give me access to the GroupName property even
though it comes up in the editor's assistant. When I tried GroupName it
generated some kind of assignment error.
Has this matter been resolved anywhere? Is there someway that I can get
my 3 togglebuttons to work like an optiongroup?
See ya & thanks
Ken McLennan
Qld, Australia