invalid use of property message
This works for hidden sheets (not veryHidden)
Sub DelHidden()
Dim sh As Worksheet
For Each sh In Worksheets
With Worksheets(sh.Name)
If Not .Visible = xlSheetVisible Then
Application.DisplayAlerts = False
sh.Delete
Application.DisplayAlerts = True
End If
End With
Next sh
End Sub
"Larry Fitch" wrote in message
...
I am trying to cre4ate a macro that checks the value of a number of sheets
to
determine if they are already visible and if so it will not close them -
With Sheets("Pay Inflation - Biometrics")
Sheets ("Statistics")
Sheets ("Direct Cost Savings Breakdown")
Sheets ("OT Reduction")
Sheets ("Nurse OT Reduction")
Sheets ("Premium Labor Utilization")
Sheets ("Pay inflation - Timestamp")
Sheets ("Calculation Error")
Sheets ("Leave Inflation")
Sheets ("Absenteeism")
Sheets ("Walk Time Reductions")
Sheets ("Paper Costs")
Sheets ("Direct Cost Savings")
Sheets ("Financial Analysis")
Sheets ("Project Timeline Savings ")
Sheets ("Total Cost of Ownership")
If .Visible < xlSheetVisible Then
.Visible = Not .Visible
End If
End With
When I run the macro I get the "invalid use of property" message.. Can
some
one tell me what I am doing wrong ??
--
Thanks
Larry
|