View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Rich Rich is offline
external usenet poster
 
Posts: 298
Default how to set a variable to a Chart? not ChartObject

Sheet1 contains "Chart 1"

I want to set a variable to "Chart 1"

Dim chrt As Chart
Set chrt = Sheets("Sheet1").ChartObjects("Chart 1")

This gives a type mismatch error. If I Dim chrt As ChartObject then I do
not get the chart methods/properties in the dropdown. But I don't see any
other options for setting chrt to "Chart 1". Any suggestions appreciated.

Thanks,
Rich