Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default change the name of the chart as it appears on the Chart Window

I have a workbook that has code for combobox which when executed generates a
chart on one of the sheets. Each time this code is run the chart name, as it
appears on the Chart Window, changes. I want to rename this to "Chart 1". As
a general question what is difference between ChartObject and Charts?

Thanks and regards
Farooq Sheri
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default change the name of the chart as it appears on the Chart Window

a ChartObject is a container for a chart when it is hosted on a worksheet.
When a chart is on a Chartsheet, there is no ChartObject.

Activesheet.ChartObjects(1).Chart.Name = "Chart 1"

--
Regards,
Tom Ogilvy


"Farooq Sheri" wrote:

I have a workbook that has code for combobox which when executed generates a
chart on one of the sheets. Each time this code is run the chart name, as it
appears on the Chart Window, changes. I want to rename this to "Chart 1". As
a general question what is difference between ChartObject and Charts?

Thanks and regards
Farooq Sheri

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default change the name of the chart as it appears on the Chart Window

thanks for the reply but I am getting "object does not support this property
or method" error

Farooq

"Tom Ogilvy" wrote:

a ChartObject is a container for a chart when it is hosted on a worksheet.
When a chart is on a Chartsheet, there is no ChartObject.

Activesheet.ChartObjects(1).Chart.Name = "Chart 1"

--
Regards,
Tom Ogilvy


"Farooq Sheri" wrote:

I have a workbook that has code for combobox which when executed generates a
chart on one of the sheets. Each time this code is run the chart name, as it
appears on the Chart Window, changes. I want to rename this to "Chart 1". As
a general question what is difference between ChartObject and Charts?

Thanks and regards
Farooq Sheri

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default change the name of the chart as it appears on the Chart Window

Activesheet.ChartObjects(1).Name = "Chart 1"

is probably what you want.

there is, however, also a chart name:

? Activesheet.ChartObjects(1).Chart.Name
Sheet1 Chart 1

--
Regards,
Tom Ogilvy


"Farooq Sheri" wrote:

thanks for the reply but I am getting "object does not support this property
or method" error

Farooq

"Tom Ogilvy" wrote:

a ChartObject is a container for a chart when it is hosted on a worksheet.
When a chart is on a Chartsheet, there is no ChartObject.

Activesheet.ChartObjects(1).Chart.Name = "Chart 1"

--
Regards,
Tom Ogilvy


"Farooq Sheri" wrote:

I have a workbook that has code for combobox which when executed generates a
chart on one of the sheets. Each time this code is run the chart name, as it
appears on the Chart Window, changes. I want to rename this to "Chart 1". As
a general question what is difference between ChartObject and Charts?

Thanks and regards
Farooq Sheri

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I recenter a pie chart within a chart window? AS Charts and Charting in Excel 2 May 6th 23 07:45 PM
Macro to change position of chart labels on line chart Shane Henderson[_2_] Charts and Charting in Excel 1 May 27th 11 09:31 AM
Chart Titles not showing in excel chart Window Greg_tnwre Excel Discussion (Misc queries) 0 July 15th 06 03:41 AM
How do you change a chart window name? MEMEMEMEMEMEME Excel Discussion (Misc queries) 1 October 18th 05 09:59 PM
vc++ automation: opening chart as chart window and setting scale Mike Biolsi Excel Programming 0 February 7th 04 08:13 AM


All times are GMT +1. The time now is 11:13 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"