Option button and Highlighting an area

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like to select option button A and have "area A" highlighted, and
"area B" darkened, and the when I select option button B have "area A"
Darkened and "area B Highlighted", Any one have any ideas please. Thank you
to all in advance for any help.
 
Not too sure what you mean by Highlight but here goes nothin... Grab 2 option
buttons from the Control Toolbox (not the forms toolbar) and place then on a
sheet. Right click on the sheet tab and slect view code. Now add the
following code...

Private Sub OptionButton1_Click()
Range("A1:A10").Interior.ColorIndex = 36
Range("B1:B10").Interior.ColorIndex = 0
End Sub

Private Sub OptionButton2_Click()
Range("B1:B10").Interior.ColorIndex = 36
Range("A1:A10").Interior.ColorIndex = 0
End Sub
 
Back
Top