simple question "disable command buttons"

E

eighthman11

Quick simple question. I want to disable a command button when my
excel spreadsheet is opened. I've tried the following code. It does
not work.

Private Sub Workbook_Open()

ActiveSheet.Buttons("CommandButton1").Enabled = False
ActiveSheet.Buttons("CommandButton2").Enabled = False


End Sub

any help appreciated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top