changing button prop with vba
WOW!! not sure what happened sorry for the multiple posts...
Sandy wrote:
Here are a couple of different ways to enable/disable a commandbutton:
From another worksheet:
Worksheets("Sheet2").CommandButton1.Enabled = True
On the current worksheet
CommandButton1.Enabled = False
-or-
ActiveSheet.CommandButton1.Enabled = False
Hope this helps...
Sandy
Arnold Klapheck wrote:
I have set a buttons enable property to false for startup and am now trying
to enable the button. It is directly on the worksheet and named
btnReconciliation I have tried the following.
Sub EnableReconcil()
ActiveSheet.btnReconciliation.enable = True
'Runtime error 438 Object dosn't support this property or message
ActiveSheet.Buttons("btnReconciliation").enable = True
'Runtime error 1004 unable to get buttons property of the worksheet class
ActiveSheet.OLEObjects("btnReconciliation").enable = True
'Runtime error 1004 unable to get buttons property of the worksheet class
End Sub
any ideas what I could do?
|