Hi Guys,
I am pretty new to VBA but I cam across a macro which lists out the hidden rows in a worksheet :-
Sub ShowRows()
Dim rng As Range
Dim r As Range
Dim sTemp As String
Set rng = Range("A1:A1000")
sTemp = ""
For Each r In rng.Rows
If r.EntireRow.Hidden Then
sTemp = sTemp & "Row " & Mid(r.Address, 4) & vbCrLf
End If
Next r
If sTemp > "" Then
sTemp = "The following rows are hidden:" & vbCrLf & _
vbCrLf & sTemp
MsgBox sTemp
Else
MsgBox "There are no hidden rows"
End If
End Sub
But now I want a macro which lists out the hidden column in same way. Thanks for help in advance.
I am pretty new to VBA but I cam across a macro which lists out the hidden rows in a worksheet :-
Sub ShowRows()
Dim rng As Range
Dim r As Range
Dim sTemp As String
Set rng = Range("A1:A1000")
sTemp = ""
For Each r In rng.Rows
If r.EntireRow.Hidden Then
sTemp = sTemp & "Row " & Mid(r.Address, 4) & vbCrLf
End If
Next r
If sTemp > "" Then
sTemp = "The following rows are hidden:" & vbCrLf & _
vbCrLf & sTemp
MsgBox sTemp
Else
MsgBox "There are no hidden rows"
End If
End Sub
But now I want a macro which lists out the hidden column in same way. Thanks for help in advance.