Hi,
I have a Pivot table in my excel
I have a code to clear contents of the Active sheet if MsgBoxClick = "Yes". Along with clearing the contents of the Active sheet, I need Pivot table to be cleared which is in a different sheet.
Sheet4(PivotTable)
If MsgBoxClick = vbYes Then rgClear.ClearContents
I used below, but didn't work.
If MsgBoxClick = vbYes Then rgClear.ClearContents
If MsgBoxClick = vbYes Then Sheet4.PivotTables.ClearTable()
Can anyone please suggest me the way of deleting pivot table.
Thanks in advance.
Bookmarks