View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Andy Pope Andy Pope is offline
external usenet poster
 
Posts: 2,489
Default ThisChart function similar to ThisWorkbook (XL2003)

Hi,

The closest thing would be ActiveChart.

Cheers
Andy

--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
wrote in message
...
Is there a way to programatically determine a chart object's name when
it's not active? ThisWorkbook provides access to the name of the
workbook that contains the code without it having to be the active
workbook. I would like to be able to get the name of the chart object
that contains the macro code even when it's not the active chart.

I have a macro that I want to use as a template to copy to a chart
object's code page that will only run if that chart is active. I'm
trying to get around having to change the chart name in the code every
time I copy it to a new chart object.