gnaga
Well-known Member
- Joined
- Jul 9, 2002
- Messages
- 748
- Office Version
- 365
- 2016
- 2013
- Platform
- Windows
Run Time Error '1004'
Unable to set the values property of series class
I am getting the aove error whiel setting the Y axis value range of my chart.
This is my code. I am not getting the error while setting the XValue property. Content in the valriable Path & FileName is same for both X & Y
Path = "D:My StockPricePriceListA
FileName = "Aarti Ind.xls"
With ActiveChart
.SeriesCollection(1).XValues = _
"'" & Path & "[" & FileName & "]Sheet1'!$F$2:$F$" & XRow
.SeriesCollection(2).XValues = _
"'" & Path & "[" & FileName & "]Sheet1'!$F$2:$F$" & XRow
.SeriesCollection(1).Values = _
"'[" & FileName & "]Sheet1'!$G$2:$G$" & XRow
.SeriesCollection(2).Values = _
"'" & Path & "[" & FileName & "]Sheet1'!$B$2:$B$" & XRow
.ChartTitle = Left(FileName, Len(FileName) - 4)
End With
Thanks
GNaga
Unable to set the values property of series class
I am getting the aove error whiel setting the Y axis value range of my chart.
This is my code. I am not getting the error while setting the XValue property. Content in the valriable Path & FileName is same for both X & Y
Path = "D:My StockPricePriceListA
FileName = "Aarti Ind.xls"
With ActiveChart
.SeriesCollection(1).XValues = _
"'" & Path & "[" & FileName & "]Sheet1'!$F$2:$F$" & XRow
.SeriesCollection(2).XValues = _
"'" & Path & "[" & FileName & "]Sheet1'!$F$2:$F$" & XRow
.SeriesCollection(1).Values = _
"'[" & FileName & "]Sheet1'!$G$2:$G$" & XRow
.SeriesCollection(2).Values = _
"'" & Path & "[" & FileName & "]Sheet1'!$B$2:$B$" & XRow
.ChartTitle = Left(FileName, Len(FileName) - 4)
End With
Thanks
GNaga