ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Charts and Charting in Excel (https://www.excelbanter.com/charts-charting-excel/)
-   -   reset chart names (https://www.excelbanter.com/charts-charting-excel/187677-reset-chart-names.html)

scott

reset chart names
 
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?

Peter T

reset chart names
 
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

"Scott" wrote in message
...
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?





All times are GMT +1. The time now is 09:11 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com