View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Brad Brad is offline
external usenet poster
 
Posts: 846
Default SeriesCollection Question

I'm trying to auto adjust a chart. Here is the code I'm using.

a is a user defined variable (in the current setup i'm using a = 15)

With Charts("Chart1")

.SeriesCollection(1).Name = "=RawData!$D$1"

.SeriesCollection(1).Values = _
Worksheets("RawData").Range(Cells(3, 6), Cells(a, 6)) <- Problem Line

End With

When I run this I get a app-def or obj-def error. Any help will be appreciated