Untested
dim lngCount as long
dim lngIndex as long
dim lngItem as long
const PREFIX ="MyRegChart"
' remove charts
for lngIndex = activesheet.chartobjects.count to 1 step -1
if left(activesheet.chartobjects(lngindex).name ,len(PREFIX)) = PREFIX then
activesheet.chartobjects(lngindex).delete
end if
next
' get number before regression
lngCount = Activesheet.chartobjects.count
' code to do regression
' <CODE HERE>
for lngIndex = lngcount+1 to activesheet.chartobjects.count
lngItem = lngItem + 1
activesheet.chartobjects(lngindex).name = prefix & lngitem
next
End sub
Bookmarks