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: 28
Default Edit Chart Macro Help - Skip ActiveChart Selection if no data

I have a macro that I have recorded. I know there is some duplicate
information here, but I am not worried about that. I have included a
part of the code below. Basically if the "SeriesCollection" is not
available on the chart for which I run the macro, the macro fails and
gives me a runtime error. So in the example below, if
SeriesCollection(3) doesn't have data, I would like it to jump to
SeriesCollection(4). Is there a way to do that? Can anyone please
help?

I would greatly appreciate it.

Conor

ActiveChart.SeriesCollection(3).Select
With Selection.Border
.ColorIndex = 10
.Weight = xlMedium
.LineStyle = xlContinuous
End With
With Selection
.MarkerBackgroundColorIndex = xlNone
.MarkerForegroundColorIndex = xlNone
.MarkerStyle = xlNone
.Smooth = False
.MarkerSize = 3
.Shadow = False
End With
ActiveChart.SeriesCollection(4).Select
With Selection.Border
.ColorIndex = 10
.Weight = xlMedium
.LineStyle = xlDash
End With

 
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
Data disappears when I edit the chart. Marith Charts and Charting in Excel 1 April 7th 10 08:21 PM
Edit Pie Chart Data Label CMH - AL Charts and Charting in Excel 0 August 29th 08 01:22 AM
Edit Chart to Change Source Data wamiller36 Charts and Charting in Excel 2 July 2nd 08 07:17 AM
Excel VBA macro - need to edit code to skip a year adun3434 Excel Programming 0 April 1st 04 09:14 PM
Argument List Of ActiveChart.Location And ActiveChart.ChartType Mo[_3_] Excel Programming 2 September 1st 03 11:12 PM


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