I am new to VB in Excel and I need to have several command buttons hidden based on cell values
I can get this to work with either one if pasted separately but I cannot seem to stack the codes under the worksheet - I would like to be able to hide up to 8 or 9 command buttons based on cell values if possible
Option Explicit
Private Sub Worksheet_Calculate()
Dim myCell As Range
Set myCell = Me.Range("q15")
If myCell.Value = 40 Then
Me.CommandButton5.Visible = True
Else
Me.CommandButton5.Visible = False
End If
End Sub
?????????????????????????? not sure how to separate these
Dim myCell As Range
Set myCell = Me.Range("s12")
If myCell.Value = 0 Then
Me.CommandButton11.Visible = True
Else
Me.CommandButton11.Visible = False
End If
End Sub
Any ideas
Thanks
Chris
Bookmarks