View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
AB[_2_] AB[_2_] is offline
external usenet poster
 
Posts: 236
Default Hide Sheets to Left Q

try this:
Sub HideLefSheets()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
If ws.Index < ActiveSheet.Index Then ws.Visible =
xlSheetHidden
Next ws
End Sub

On Mar 4, 9:28*am, Seanie wrote:
What code could I use to hide all sheets to the "left" of where the
active cell is?