I want to implement given below VBA Script to 1000+ excel files in One go. below script is working but I have to run this script one by one on files. Is this possible to run this script in one go?
All files are in one folder, exact count of files is 1068, 1 sheet in every file.
Sub DeleteCols()
Application.ScreenUpdating = False
Dim i As Long, lCol As Long, delRange As Range
lCol = Cells(1, Columns.Count).End(xlToLeft).Column
For i = 1 To lCol
If InStr(Cells(1, i), "/description") > 0 Then
If delRange Is Nothing Then
Set delRange = Columns(i)
Else
Set delRange = Union(delRange, Columns(i))
End If
End If
Next i
If Not delRange Is Nothing Then delRange.Delete
Application.ScreenUpdating = True
End Sub
Bookmarks