Hello Excellers,
With a value in cel B23 on every sheet i want to hide or unhide the sheets.
Standard they are hidden when i start. Who can help me with a procedure for
this pls?
Greetings,
Reijer.
Martin Fishlock - 18 Dec 2006 02:04 GMT
Reijer:
You can hide/unhide sheets with the following VBA command
activesheet.visible=true/false.
So to go thru all the worksheets in a workbook and check depending on if
there is a value in B23:
Option Explicit
Sub CheckAllWorksheets()
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
If ws.Range("B23").Value <> "" Then
ws.Visible = xlSheetVisible
Else
ws.Visible = xlSheetHidden
End If
Next ws
End Sub

Signature
Hope this helps
Martin Fishlock
Please do not forget to rate this reply.
> Hello Excellers,
>
[quoted text clipped - 5 lines]
>
> Reijer.
Reijer - 18 Dec 2006 14:38 GMT
I'll try this out Martin,
Thanks for your reaction.
> Hello Excellers,
>
[quoted text clipped - 5 lines]
>
> Reijer.