-
Solved: Radio button is not working.
Hi, what's wrong with my codes?
I have two radio buttons. If a user selects optionbutton1, then it will shade Range("G7:G20") otherwise, shade a different range.
But then I click the radio button, nothing happens.
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
If OptionButton1.Value = True Then
Range("F7:G20").Select
With Selection.Interior
.Pattern = xlLightDown
.PatternColorIndex = xlAutomatic
.ColorIndex = xlAutomatic
.TintAndShade = 0
.PatternTintAndShade = 0
End With
Else
Range("C7
20").Select
With Selection.Interior
.Pattern = xlLightDown
.PatternColorIndex = xlAutomatic
.ColorIndex = xlAutomatic
.TintAndShade = 0
.PatternTintAndShade = 0
End With
End If
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules