Excel 2003
VB 6.5
My original spreadsheet has two worksheets with the following names:
The first sheet is "June 2008 to date".
The second sheet is "July 2007 to date".
I recorded a macro (see below) that produces a pivot table and pivot chart using the data on the second sheet, "July 2007 to date".
After recording I see two new sheets:
A sheet labeled "Sheet1" inserts itself to the left of the sheet "July 2007 to date' and to the left of that sheet is one called "Chart1".
When I run the macro again I get a "Subscript out of range" message. I noticed that it produced two more sheets to the left of "Sheet1" and "Chart1", i.e. "Sheet2" and "Chart2".
Since the line
is fixed, for now, it needs to be generalized. Or perhaps do I need to query the program at the beginning to delete any previously created "sheets" and "charts".
Need help for that part of the code.
Thanks
Bookmarks