Daugaard92
New Member
- Joined
- Nov 20, 2020
- Messages
- 17
- Office Version
- 2016
- Platform
- Windows
I have an Excel-sheet, which contains 6 checkboxes and a few cells which requires user input.
The checkboxes are Active-X objects and I want the checkboxes visiblity to depend on the values in specific cells.
This means that I want each checkbox to be shown/hiden, dependant on the user input and value in specific cells.
For instance, I'd like CheckBox1 to be displayed, if the value in C15 <> 0.
After doing some research i created the following macro:
Private Sub Worksheet_Change(ByVal Target As Range)
If Range("C15").Value = 0 Then
Sheets("Ark1").CheckBox1.Visible = False
Else
Sheets("Ark1").CheckBox1.Visible = True
End If
End Sub
But the macro has no affect on the visibility of the CheckBox regardless of the changes being done to cell C15.
Is someone able to identify what I'm doing wrong and steer me on a correct course?
The checkboxes are Active-X objects and I want the checkboxes visiblity to depend on the values in specific cells.
This means that I want each checkbox to be shown/hiden, dependant on the user input and value in specific cells.
For instance, I'd like CheckBox1 to be displayed, if the value in C15 <> 0.
After doing some research i created the following macro:
Private Sub Worksheet_Change(ByVal Target As Range)
If Range("C15").Value = 0 Then
Sheets("Ark1").CheckBox1.Visible = False
Else
Sheets("Ark1").CheckBox1.Visible = True
End If
End Sub
But the macro has no affect on the visibility of the CheckBox regardless of the changes being done to cell C15.
Is someone able to identify what I'm doing wrong and steer me on a correct course?