Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default bar vs. line chart

I have the following code:

ActiveSheet.ChartObjects("chtLine").Activate
ActiveChart.ChartArea.Select
ActiveChart.SeriesCollection(1).Name = Sheets
("Runnability").Range("AllTitle").Value
If Sheets("Runnability").Range("PressTitle").Value
< "" Then
ActiveChart.SeriesCollection(2).Name = Sheets
("Runnability").Range("PressTitle").Value
Else
ActiveChart.SeriesCollection(2).Name = "No data"
End If

The line where it is setting series 2 name to "No data"
fail on a line chart with the following error:

Unable to set the name property of the Series class

This works fine for a Bar chart!!!

The only way I know to fix this is to dynamically destroy
and re-create the data series for the charts. But, I
hate to have to do that. Anyone know another way to work
around the error?
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
Excel 2007 Line Chart - Chart line to go directly to next value TyreDude Charts and Charting in Excel 3 October 12th 11 12:52 PM
How do I convert a line chart to a vertical line chart in Excel Gerty Charts and Charting in Excel 1 August 20th 09 04:28 PM
How to change bar to line in line-column on 2 axes chart in Excel2 jaysan3 Charts and Charting in Excel 2 July 2nd 08 11:13 AM
Getting line on line chart to display after creation from Pivot Table dcsi_jim Charts and Charting in Excel 8 February 6th 07 08:54 PM
Make a line in a bar chart, and change color of any bars that exceed the line MarkM Excel Discussion (Misc queries) 4 July 5th 06 04:06 PM


All times are GMT +1. The time now is 06:42 PM.

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"