Hi Adrae
Try This code.
Sub Delet_Hidden_Columns()
Dim i As Integer
For i = Cells.SpecialCells(11).Column To 1 Step -1
With Columns(i).EntireColumn
If .Hidden = True Then .Delete (xlShiftToLeft)
End With
Next
End Sub
That did it. Thank You!!!
Hello Again Colo - One adjustment to this. How would I modify this to delete these hidden columns on every sheet in the workbook without knowing the sheets' names. Thanks again.
:-) Adrae
Hello Adrae! (^o^)
:How would I modify this to delete these hidden columns on every sheet
:in the workbook without knowing the sheets' names.
How to modify the code is simple.
Only loop each sheet with "For Each Next statment"
I made sample 4 u.
Sub Sample()
Dim Sh As Worksheet, i As Integer
Application.ScreenUpdating = False
For Each Sh In Worksheets
For i = 256 To 1 Step -1
With Sh.Columns(i).EntireColumn
If .Hidden = True Then .Delete (xlShiftToLeft)
End With
Next
Next
Application.ScreenUpdating = True
MsgBox "...Done!"
End Sub