ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   SeriesCollection Question (https://www.excelbanter.com/excel-programming/419207-seriescollection-question.html)

Brad

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




All times are GMT +1. The time now is 12:38 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com