View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
robs3131 robs3131 is offline
external usenet poster
 
Posts: 144
Default Enabled property failing when code tries to set it

Hi all,

I'm getting the error below for the code below for the line that is preceded
by '***' - I don't understand why this property cannot be set for this
variable. Any input is greatly appreciated!

Error:

Run-time error '438: Object doesn't support this property or method

Code:

Dim sh As Worksheet
Dim shap

'Select Main Menu, hide all other sheets, and protect Main Menu
Sheets("Main Menu").Visible = xlSheetVisible
Sheets("Main Menu").Select
For Each sh In ActiveWorkbook.Sheets
If sh.Name < "Main Menu" Then
sh.Visible = xlVeryHidden
Else
End If
Next
Sheets("Main Menu").Activate
For Each shap In ActiveSheet.Shapes
*** shap.Enabled = False
Next shap

--
Robert