Pages

Wednesday, September 28, 2011

Unhide ALL Rows & Cols From A worksheet

Sub unhide_all_rows_cols_from_all_worksheets()
'it will unhide all rows and cols from all worksheets in a workbook
Dim wk As Worksheet
For Each wk In ThisWorkbook.Sheets
wk.Select
Cells.EntireRow.Hidden = False
Cells.EntireColumn.Hidden = False
Next wk

End Sub


Sub unhide_all_rows_cols__for_specific_worksheets()
'it will unhide all rows and cols from all worksheets in the list Array("Sheet1", "Sheet2")
Dim abc()
Dim wk As Worksheet
Dim i As Integer
abc = Array("Sheet1", "Sheet2")
For i = LBound(abc) To UBound(abc)
For Each wk In ThisWorkbook.Sheets
If wk.Name = abc(i) Then
wk.Select
Cells.EntireRow.Hidden = False
Cells.EntireColumn.Hidden = False
Exit For
End If
Next wk
Next i
End Sub

1 comment:


  1. With integrity, you have nothing to fear, since you have nothing to hide. With integrity, you will do the right thing, so
    you will have no guilt. See the link below for more info.


    #hide
    www.ufgop.org

    ReplyDelete