Refer to a control name from another sheet
Sure it's called "commandbutton" ?
This works for me:
'This is on Worksheets(2)
Private Sub CommandButton1_Click()
Worksheets(1).CommandButton1.Enabled = False
End Sub
NickHK
"rezafloyd" wrote in message
ups.com...
Dear experts,
I embed a command button on sheet1 on a an excel workbook.
I'd like to change it's 'enabled' property at run time from a code in
sheet2.
How can I refer to it's name? (ex. 'worksheets(1).commandbutton.enabled
=false' doesn't work)
Regards,
reza
|