Hi

I want to create a Macro for 30 checkboxes to hide a respective number Command button and I have tried with one but am having no luck with the coding below (it's very basic)

Sub CheckBox15_Click()
If CheckBox15.Value = True Then
ActiveSheet.Shapes("Button17").Visible = True
Else
ActiveSheet.Shapes("Button17").Visible = False
End If

End Sub

Could someone help as to how I get a single checkbox to hide and unhide a command button when the checkbox is checked/unchecked

Thanks

Daniel