View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Rob van Gelder[_4_] Rob van Gelder[_4_] is offline
external usenet poster
 
Posts: 1,236
Default Code to make sheets in a workbook visible

Thomas,

First bit makes them all visible
Second bit makes the first worksheet hidden (but not VeryHidden)

Sub test()
Dim wks As Worksheet

For Each wks In ActiveWorkbook.Worksheets
wks.Visible = xlSheetVisible
Next

ActiveWorkbook.Worksheets(1).Visible = xlSheetHidden
End Sub


--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Jonsson " wrote in message
...
Hi all,

I need help to create a code that makes the sheets in a workbook hidden
or unhidden.

I have screwed up and now my sheets are Veryhidden from the bar!

Anyone?

Thanks,

Thomas


---
Message posted from http://www.ExcelForum.com/