LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Looping through selected charts

I have a worksheet with a number of embedded charts. In previous versions of
Excel within a macro I could loop through the charts that the user has
selected (either one or more) by using code of the form:

If (ActiveChart Is Nothing) Then
For Each coChartObject In Selection
coChartObject.Chart.HasTitle = True
coChartObject.Chart.ChartTitle.Text = sInputBoxResponse
Next coChartObject
Else
ActiveChart.HasTitle = True
ActiveChart.ChartTitle.Text = sInputBoxResponse
End If

This code no longer works in 2007. What am I doing wrong? What code in
2007 can perform similarly?

Note: If I select one chart the object type of the selection is ChartArea,
if more than one chart is selected the object type of the selection is
ChartObjects. In the case of the latter, the .Count of the ChartObjects is
NOT equal to the number of charts that are selected, however, is equal to the
number of charts in the worksheet.

Thank you
 
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
looping through selected sheet tabs Gary Adamson[_2_] Excel Programming 4 December 7th 04 01:09 PM
Looping through charts in a worksheet Grant Excel Programming 1 August 6th 04 09:22 AM
Looping through to stop on pie charts Daniel Bonallack[_2_] Excel Programming 1 July 13th 04 06:11 PM
Looping Through Charts Mike Waldron[_2_] Excel Programming 1 May 21st 04 06:21 PM
Looping Through Charts No Name Excel Programming 1 May 20th 04 10:36 PM


All times are GMT +1. The time now is 10:29 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"