View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Need help condensing with-end with code

Worksheets(Array("Touches","Notes","Add-delete history","Graph
Data")).Visible = xlSheetHidden


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"excelnut1954" wrote in message
ups.com...
I'm sure this can all be condensed. I've looked in Help, and looked for
other posts, with no luck.
Can't I name all the sheets together?

I'm thinking somethning like:
With Sheets("Touches")("Notes")("Add-delete history")("Graph Data)

This code below works. Would like to put it all in 1 block. Can anyone
help?
Thanks,
J.O.

With Sheets("Touches")
.Visible = False
End With
With Sheets("Notes")
.Visible = False
End With
With Sheets("Add-delete history")
.Visible = False
End With
With Sheets("Graph Data")
.Visible = False
End With