View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
eighthman11 eighthman11 is offline
external usenet poster
 
Posts: 17
Default simple question "disable command buttons"

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.