Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 915
Default How to Expose SeriesCollection?

Today I tried to discover how to update the SeriesCollection in several
charts. I would like to loop through my charts and update the existing
SeriesCollection based on some information about the worksheet name.

I started by recording a macro while I updated the x-axis range on one
chart's series, and found this

EXHIBIT A:

ActiveChart.SeriesCollection(1).XValues = "=MI!R32C2:R50C3"

OK, cool. To know the existing XValues for a series all I need to do is
name the chart, point at the correct series index, and viola, right? So,
I assumed I could expose the existing SeriesCollection like this:

Public Sub FixSeriesRanges()
Dim MyChart As Chart
Dim j As Long
For Each MyChart In ThisWorkbook.Charts
For j = 1 To 6
' FAILS (13 - Type Mismatch)
Debug.Print MyChart.SeriesCollection(j).XValues
Next j
Next
End Sub


Not so! It turns out the XValues property is a collection of values that
specify each x-axis value.

So, how can I determine the range of x-axis values, such as returned in
EXHIBIT A?
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: Expose whole window or at least top resize handles. Reinie Excel Discussion (Misc queries) 1 August 25th 09 04:11 PM
expose excel spreadsheet in web page Rea Excel Programming 0 April 30th 06 10:42 AM
VBA to expose details of zip files Chris Jones Excel Programming 7 January 31st 06 09:03 PM
Expose macros with add-in Dave Stice Excel Programming 6 January 30th 06 05:50 PM
Searching for link: Bob Phillips expose on NAMES davidm Excel Programming 2 January 28th 06 08:10 AM


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