Trefor,
Following Bob's observation about your button named "Button 30", I guess it
is neither a userform button nor a Commanbutton but a button on a sheet
applied with the Forms toolbar. If so try this in a Normal module
Sub TestEnable()
EnableButton "Button 30", True
End Sub
Sub TestDisable()
EnableButton "Button 30", False
End Sub
Function EnableButton(sBtnName As String, bEnable As Boolean)
Dim btn As Button
On Error Resume Next
Set btn = ActiveSheet.Buttons(sBtnName)
If btn Is Nothing Then
MsgBox sBtnName & " does not exist on this sheet"
Else
btn.Enabled = bEnable
'simulate greyed out text if disabled
btn.Font.Color = IIf(bEnable, 0, RGB(150, 150, 150))
End If
End Function
Regards,
Peter T