View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Jon Peltier Jon Peltier is offline
external usenet poster
 
Posts: 6,582
Default Activechart.SetSourceMethod problem

Check my responses in the charting group.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
http://PeltierTech.com/Excel/Charts/
_______

grinning_crow < wrote:

Hi

I'm trying to write a sub-procedure that creates charts based on
variables entered from a userform. Two of the variables specify a date
range for which the graph should plot. This therefore means that I need
to use two ranges within the source parameter of the SetSourceData
method - one for the headings, and one for the data itself, which
begins a variable number of rows below the headings. As well as this,
there are a variable number of column sets which contain similar data
but for different reporting areas.

i.e. something like this:

Activechart.SetSourceData Sheet1.Range(FromColumn & "2:" & ToColumn &
"3" _ 'setting the headings from rows 2 and 3
' and then the second range grabbing the data:
, FromColumn & FromRow & ":" & ToColumn & ToRow), xlColumns

etc.

Unfortunately, when it creates the graph, its not recognising it as two
distinct ranges, but creating one graph using the entire number of rows
in the current region for the specified columns.

I've no doubt I'm being extremely dim and its right in front of me, but
if someone could point me to a solution, that would be appreciated.

Thanks.


---
Message posted from http://www.ExcelForum.com/