SOLVED!!! My god... after 2 days
'FINAL - deletes all charts AND deletes empty rows from ALL sheets in workbook
Sub Delete_Charts_and_EmtyRows()
Dim Ws As Worksheet, chtObj As ChartObject, i As Long, LastRow As Long
With Application
.Calculation = xlCalculationManual
.ScreenUpdating = False
For Each Ws In ThisWorkbook.Worksheets
Ws.Activate 'KEY!! This seems to have solved looping through Sheets
For Each chtObj In Ws.ChartObjects 'Finds chart objects and deletes them
chtObj.Delete
Next
LastRow = Ws.Cells(Rows.Count, 1).End(xlUp).Row 'Returns the number of last row with data, stores it in var LastRow
For i = LastRow To 1 Step -1 'Loops through the selection, deletes empty rows
If WorksheetFunction.CountA(Rows(i)) = 0 Then
Rows(i).EntireRow.Delete
End If
Next
Next Ws
.Calculation = xlCalculationAutomatic
.ScreenUpdating = True
End With
End Sub
Bookmarks