Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
"Rich" wrote in message
... 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. Hi Rich, This is how to get at the underlying Chart contained in a ChartObject: Set chrt = Sheets("Sheet1").ChartObjects("Chart 1").Chart -- Rob Bovey, Excel MVP Application Professionals http://www.appspro.com/ * Take your Excel development skills to the next level. * Professional Excel Development http://www.appspro.com/Books/Books.htm |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dim chrt As Chart
Set chrt = Sheets("Sheet1").ChartObjects("Chart 1").Chart -- Regards, Tom Ogilvy "Rich" wrote in message ... 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 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks all for your replies. Really appreciate it.
Rich |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Delete old chartobject and create a new named one? | Charts and Charting in Excel | |||
Selecting chartobject without index no. | Charts and Charting in Excel | |||
ChartObject Name Restricion or Excel Bug | Excel Programming | |||
Fill screen with chartobject by zooming? | Charts and Charting in Excel | |||
ChartObject index | Excel Programming |