View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
michael fuller michael fuller is offline
external usenet poster
 
Posts: 5
Default Hide and/or Unhide Worksheets

Hi Rob

You could try this.

Sub Merchant_visible()

Dim ws As Worksheet

Sheets("merchant").Visible = -1
For Each ws In Worksheets
If ws.Name < "mercnant" Then
Sheets(ws.Name).Visible = 2
End If
Next
End Sub

"Rob" wrote in message
...
I want to unhide the Vendor Worksheet only
(In this case it could be a Merchant Worksheet, Or a Procurement
Worksheet)
I don't want to specify names of other worksheets that need to be hidden
for
some may not be created as yet. I want to specify one sheet to be visible
in
separate macros. So one macro would say unhide the Vendor Worksheet and
hide
the rest. Another might say unhide the Merchant Worksheet and the Vendor
Worksheet and hide the rest.