I have this following code in one of my worksheets., but it doesn't work.
The idea; If I select some certain cell the it changes the color of the selected cell depended on if optionbutton10, optionbutton11 or optionbutton12 is selected.
PHP Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Application.Intersect(Target, Range("A6:G6")) Is Nothing Then
If OptionButton11 = True Then
Target.Interior.ThemeColor = xlThemeColorAccent4
Target.Value = "Sigga"
Else
If OptionButton10 = True Then
Target.Interior.ThemeColor = xlThemeColorAccent5
Targetvalue = "Hrafnhildur"
Else
If OptionButton12 = True Then
Target.Interior.ThemeColor = xlThemeColorAccent6
Targetvalue = "Kristin"
Else
End If
End If
End If
End If
End Sub
Bookmarks