Hidding especific sheet

M

mik00725

In a workbook I have 10 different sheets. I want to hide 3 differen
sheets and leave the other unhide. How can I do this
 
B

Bob Phillips

worksheets("Sheet1").visible = xlSheetVisible
worksheets("Sheet2").visible = xlSheetHidden

etc.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
D

Don Guillett

something like
for each ws in worksheets
if ws.name <> "diff1" and ws.name<> "diff2") then ws.visible=false
next ws
 
G

Gord Dibben

Select the 3 sheets using CTRL + click on sheet tabs.

Format>Sheet>Hide


Gord Dibben MS Excel MVP
 
Top