C
Craig Brandt
Hi:
I need to clear 31 sheets of data (daily downloads) and cycling through them
is timely and just not very elegent. (Look at me, trying to be elegent when
I can barely use VBA!)
What I did was turned on macro recording, selected several sheets then
depressed "Delete". After responding "Yes" to three popups asking if I
wanted to clear the QueryTables, it seemed to work. When I went back to look
at the generated Macro, it got hung up (Application-definded or
object-defined error) on the line deleteing the querytable, and this seemed
to happen before I even re-executed the macro.
Sheets("21").Select
Cells.Select
Sheets(Array("21", "22")).Select
Sheets("21").Activate
Selection.ClearContents
Selection.QueryTable.Delete
Any clues or alternate ways of accomplishing my intent?
Thanks,
Craig
I need to clear 31 sheets of data (daily downloads) and cycling through them
is timely and just not very elegent. (Look at me, trying to be elegent when
I can barely use VBA!)
What I did was turned on macro recording, selected several sheets then
depressed "Delete". After responding "Yes" to three popups asking if I
wanted to clear the QueryTables, it seemed to work. When I went back to look
at the generated Macro, it got hung up (Application-definded or
object-defined error) on the line deleteing the querytable, and this seemed
to happen before I even re-executed the macro.
Sheets("21").Select
Cells.Select
Sheets(Array("21", "22")).Select
Sheets("21").Activate
Selection.ClearContents
Selection.QueryTable.Delete
Any clues or alternate ways of accomplishing my intent?
Thanks,
Craig