F
Francis Hookham
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
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