Hello
I have the below code. But it seems to be slowing down the rest of my code taking about 1 min to complete.
I have it as 1 of 8 subs that get called in order.
Prior to all the calls I also have:
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Application.EnableEvents = False
I turn them all on after the code completes.
Thank you in advance!
I have the below code. But it seems to be slowing down the rest of my code taking about 1 min to complete.
I have it as 1 of 8 subs that get called in order.
Prior to all the calls I also have:
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Application.EnableEvents = False
I turn them all on after the code completes.
VBA Code:
Sub FDeleteBlankColumns()
Dim iCntr
Dim Rng As Range
Set Rng = Range("B2:M500")
For iCntr = Rng.Column + Rng.Columns.Count - 1 To Rng.Column Step -1
If Application.WorksheetFunction.CountA(Columns(iCntr)) = 0 Then Columns(iCntr).EntireColumn.Delete
Next
End Sub
Thank you in advance!