Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default For each objcht in ...

I want to do the following:

For Each objCht In SheetCodeName
With objCht
Debug.Print .Chart.ChartTitle.Text
End With
Next objCht

I'm getting an error on the first line. For this example, I'm assuming the
code name is SheetCodeName. What am I doing wrong.

In addition, I want to parse the chart title with the split at "-", what do
I need to do. There should be only one entry of "-"

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 226
Default For each objcht in ...

I would use the ChartObjects collection instead

For each objChart in SheetCodeName.ChartObjects
With objCht

End With
Next objChart

and depending on what you need to do with the title, you can use the
Left$(), Right$(), Mid$() and InStr() functions.

--
Regards,

Juan Pablo González

"Joel" wrote in message
...
I have the following code in one of my worksheets

For Each AllCharts In Worksheets(TemperatureSheetName).Shapes

As you can see the chart is a shape.

"Barb Reinhardt" wrote:

I want to do the following:

For Each objCht In SheetCodeName
With objCht
Debug.Print .Chart.ChartTitle.Text
End With
Next objCht

I'm getting an error on the first line. For this example, I'm assuming
the
code name is SheetCodeName. What am I doing wrong.

In addition, I want to parse the chart title with the split at "-", what
do
I need to do. There should be only one entry of "-"

Thanks



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
For each objcht in ... Joel Excel Programming 0 February 15th 07 03:42 PM


All times are GMT +1. The time now is 10:23 PM.

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

About Us

"It's about Microsoft Excel"