View Single Post
  #12   Report Post  
Posted to microsoft.public.excel.programming
Jim Cone Jim Cone is offline
external usenet poster
 
Posts: 3,290
Default Test for if sheet is HIDDEN


It is my "Oops" not yours.
As I said, air code is the most difficult to write.
My modification just screws it up.
Your original code works in xl97, if you add a line to make the sheet visible.
(as you have done below)
Jim Cone



"JE McGimpsey"
wrote in message
Oops- perhaps I posted in the wrong code. I meant to post (and did test):
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
Select Case ws.Visible
Case xlSheetVisible
'Do this
MsgBox ws.Name & " Visible"
Case xlSheetHidden
'Do that
MsgBox ws.Name & " Hidden"
Case xlSheetVeryHidden
'Do nothing?
MsgBox ws.Name & " Very Hidden"
End Select
Next ws


"Jim Cone"

wrote:

with JE's code
replace "Select Case ws.Visible" with "Select Case True"
(air code is the most difficult type to write)