View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Jim Rech
 
Posts: n/a
Default Can you delete all hidden columns in an area in one move?

This might do it. Tested lightly<g

Sub DelAllHiddenCols()
Dim Col As Range
Dim DelCols As Range
For Each Col In Rows(1).EntireColumn
If Col.Hidden Then
If DelCols Is Nothing Then
Set DelCols = Col
Else
Set DelCols = Union(DelCols, Col)
End If
End If
Next
If Not DelCols Is Nothing Then DelCols.Delete
End Sub


--
Jim
"Gizmofied" wrote in message
...
|I am wondering if it is possible in Excel to permanently delete all hidden
| columns in an area of a worksheet with one move (without having to unhide
| every column and then manually delete each column)?