Hi All,
I am using the below to clear out an existing table. Is there an easy way to modify this to perform the same command on multiple tables within the same sheet? Please note there is a pivot table that I want to ensure remains unchanged as I clear out these tables. Any help is greatly appreciated. Thank you.
![]()
Sub ClearJournalTables() If MsgBox("This will clear the table! Are you sure?", vbYesNo) = vbNo Then Exit Sub Application.ScreenUpdating = False Worksheets("Sheet1").ListObjects("Table16").AutoFilter.ShowAllData Dim lstObj As ListObject Set lstObj = ActiveSheet.ListObjects("Table16") lstObj.DataBodyRange.Rows.Delete Application.ScreenUpdating = True End Sub
Bookmarks