Delete Hidden Columns
Posted by Adrae on December 10, 2001 11:40 AM
I am using the following code to delete all hidden columns in a workbook. The macro appears to run ok, but no columns get deleted. What am I doing wrong? Thanks :-) Adrae
Dim Sh As Worksheet, i As Integer
Application.ScreenUpdating = False
For Each Sh In Worksheets
For i = 256 To Step - 1
With Sh.Columns(i).EntireColumn
If .Hidden = True Then .Delete (xlShiftToLeft)
End With
Next
Next