hi experts
i have a excel worksheet ,which have an excel button
how i can disable the button ?
any code line please help :wave:
Printable View
hi experts
i have a excel worksheet ,which have an excel button
how i can disable the button ?
any code line please help :wave:
A command button or aer you talking about a toolbar button?
In case you mean a Command Button on a sheet.
VB Code:
Workbooks(1).Sheets(1).OLEObjects("CommandButton1").Enabled = False
it is an excel button from tools bar of excel sheet
Then its a OLEObjects or ActiveX command button so the above posted code will work.