Hi everyone,
I'm fairly new to VBA, and I can't seem to get my code to work for these checkboxes. My spreadsheet is a sales quoting sheet, and the checkboxes are 3 additional options. They need to be enabled/disabled based on the response to a drop-down on a previous cell. I'll put the code I have below. I don't know if I'm not "activating" the code right, or if the code itself is wrong.
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address(0, 0) = "V17" Then
If Target.CountLarge > 1 Then Exit Sub
If Target.Value = "" Then Exit Sub
Select Case UCase(Target.Value)
Case UCase("Prosurance")
ActiveSheet.DrawingObjects("CheckBox1").Value = True
ActiveSheet.DrawingObjects("CheckBox2").Value = True
ActiveSheet.DrawingObjects("CheckBox3").Value = True
Case UCase("Care")
ActiveSheet.DrawingObjects("CheckBox1").Value = True
ActiveSheet.DrawingObjects("CheckBox2").Value = False
ActiveSheet.DrawingObjects("CheckBox3").Value = False
Case UCase("MI Only")
ActiveSheet.DrawingObjects("CheckBox1").Value = False
ActiveSheet.DrawingObjects("CheckBox2").Value = False
ActiveSheet.DrawingObjects("CheckBox3").Value = False
Case UCase("Assurance")
ActiveSheet.DrawingObjects("CheckBox1").Value = True
ActiveSheet.DrawingObjects("CheckBox2").Value = True
ActiveSheet.DrawingObjects("CheckBox3").Value = True
Case UCase("PM Only")
ActiveSheet.DrawingObjects("CheckBox1").Value = False
ActiveSheet.DrawingObjects("CheckBox2").Value = False
ActiveSheet.DrawingObjects("CheckBox3").Value = False
End Select
End If
End Sub
Bookmarks