Delete Hidden Columns
Posted by Adrae on December 14, 2001 7:33 AM
Can anyone tell me why the follwoing is not working:
Sub DeleteHiddenColumns()
Application.ScreenUpdating = False
sName = ActiveSheet.Name
Dim Sh As Worksheet, i As Integer
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
Sheets(sName).Select
End Sub