Thread: Hide sheets
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Mike Mike is offline
external usenet poster
 
Posts: 3,101
Default Hide sheets

Sub testData()
Dim whatSheet As Worksheet
For i = 1 To 10
Set curCell = Worksheets("Sheet1").Cells(i, 1)
If Not IsEmpty(curCell.Value) Then
Set whatSheet = Worksheets(curCell.Value)
whatSheet.Visible = xlSheetVeryHidden
End If
Next i
End Sub

"Steve" wrote:

Hi all. I have a list of sheets within the workbook in the range
Sheet1 A1:A10. How can I have vba hide the sheets that are listed in
that range? Thanks!