I've got a VERY basic macro that only applies to one row right now and I need to copy it to other rows so that it will apply to the specific row it is in.
Here is what I have right now:
All I am needing the macro to do is highlight the row yellow when OptionButton2 is selected and unhighlight when OptionButton1 is clicked. I am able to do this in the original row that I have the macro but I don't know how to get it to transfer to the other rows in the sheet. I also need the flexibility to be able to add rows in case there is more info in some sheets and have the macro work in those rows.
Thanks!
Here is what I have right now:
Private Sub OptionButton1_Click()
Range("A3:L3").Select
Range("L3").Activate
Selection.Interior.ColorIndex = xlNone
End Sub
Private Sub OptionButton2_Click()
Range("A3:L3").Select
Range("L3").Activate
With Selection.Interior
.ColorIndex = 6
.Pattern = xlSolid
End With
End Sub
All I am needing the macro to do is highlight the row yellow when OptionButton2 is selected and unhighlight when OptionButton1 is clicked. I am able to do this in the original row that I have the macro but I don't know how to get it to transfer to the other rows in the sheet. I also need the flexibility to be able to add rows in case there is more info in some sheets and have the macro work in those rows.
Thanks!