Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / December 2007

Tip: Looking for answers? Try searching our database.

Variable Series in graphs

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
jersiq@comcast.net - 17 Dec 2007 22:15 GMT
I have a problem with adding series to a newly created graph in VBA
The ranges for my data need to be pulled from a variable amount of
sheets, based upon the data I am currently working with.

The array to obtain the variable values is in an array of integers
which may not be necessarily sequential.

i.e on one book I may have the integers of 1, 2, 3, 4
on another I may have 1, 2, 3, 9, 10

I am able to create the series, and chart without any problems,
however when I run my macro it gives an error of "series formula is
too long"
I checked the help, but I am not quite sure where I am going wrong
here.
below is my code, the parts that are only pertinent to making the
charts.

Set alpha_chartobj = Sheets("Alpha Face").ChartObjects.Add _
           (250, 375, 75, 225)

   With alpha_chartobj.Chart
     .ChartType = xlLine

       For Each carrier_graph In Sheets("Sheet1").Range("D2:D" &
carrier_array_upper)
           With .SeriesCollection.NewSeries
               .Values = Sheets("F" & carrier_graph).Range("B2:B" &
last_row_filtered)
               .Name = "F" & carrier_graph
            End With
       Next
   End With
jersiq@comcast.net - 17 Dec 2007 22:18 GMT
On Dec 17, 5:15 pm, jer...@comcast.net wrote:
> I have a problem with adding series to a newly created graph in VBA
> The ranges for my data need to be pulled from a variable amount of
[quoted text clipped - 29 lines]
>         Next
>     End With

Sorry I forgot to mention the error "Series Formula is too long"
occurs on the line:

Set alpha_chartobj = Sheets("Alpha Face").ChartObjects.Add _
            (250, 375, 75, 225)
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.