Hello Lee & Steve,
Here is way to write the macro so the button name isn't hard code into the macro. This way the macro can be assigned to a Button without knowing its name. This works only with Forms buttons, not Control Toolbox command buttons.
Sincerely,![]()
Sub HideButton() With ActiveSheet.Buttons(Application.Caller) If Range("A1").Value = 1 Then .Visible = False Else .Visble = True End If End With End Sub
Leith Ross
Bookmarks