View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Francis Hookham Francis Hookham is offline
external usenet poster
 
Posts: 125
Default Clearing radio buttons

Thanks for your comment Toby. Although an XL user (inc Multiplan) days it
has been as a self taught amateur, not good at reading complicated text
books. Can you point me to a simple explanation of the need for grouping
radio buttons.



I have grouped the buttons and using Gary's

userform1.optionbutton1=false

all is well.



Thank you also for the link to your website - it is now a Links bar
favourite named 'XL' so I can keep an eye on you and get to the very useful
Links page - recently, by mistake, I wiped all my links to those amazing
MVPs.



Thanks from Cambridge, UK



Francis




"Air_Cooled_Nut" wrote in message
...
When radio buttons are together in a group, like in a Frame, then clicking
one will automatically clear the other. So it sounds like your Option
Buttons aren't properly grouped with each other.
--

Toby Erkson
http://excel.icbm.org/


"Francis Hookham" wrote:

The clicked radio button in a UserForm does not clear so clicking the
same
button again does not work, whereas clicking another radio button next
does
work.



Is there an instruction I should incorporate to clear the previous
clicking
of the button? If so what and where should it go?



Francis Hookham



--------------------------------------------------------------



Private Sub OptionButton6_Click()

'colour frame(s) orange

Userform1.Hide

ColourOrange

End Sub



Sub ColourOrange()

FindFrameRow

'set colour

ActiveWorkbook.Colors(21) = RGB(255, 245, 225)

FillColour = 21

OneShotColour

End Sub



Sub FindFrameRow()

If ActiveCell.Row = 1 Or ActiveCell.Row = 2 Then

RowNo = 3

Else

RowNo = ActiveCell.Row

While Cells(RowNo, 1) = ""

RowNo = RowNo - 1

Wend

End If

Cells(RowNo, 1).Select

End Sub



Sub OneShotColour()

'given 'RowNo', this performs the colour change of one shot

Range(Cells(RowNo, 2), Cells(RowNo + 15, 10)). _

Interior.ColorIndex = FillColour

Cells(RowNo, 7).Interior.ColorIndex = xlNone

Cells(RowNo, 9).Interior.ColorIndex = xlNone

End Sub