reset chart names

S

Scott

I have a VBA function that will copy 12 charts from various workbooks into a
single workbook. I run this macro once a month. Before I run the macro I
delete all the charts from the single workbook. After running the macro I
notice that the chart names (e.g. 1,2,3,...) increase by the number of charts
I copy. For example when I first ran the macro the charts in the single
workbook were named 1 ..12. After deleting the charts in the single workbook
and running the macro again the charts are named 13..24. Is there a way to
reset the chart names so they are always 1..12 in the single workbook?
 
P

Peter T

After deleting the charts, and all shapes on the sheet (if you want to keep
any temporarily cut/paste them to another sheet), save the workbook, close
it, reopen it. That's the only way I know to reset the object counter.
]
Regards,
Peter T
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top