![]() |
Error 1004: Unable to set the XValues of the Series Class
The first 2 times I run this code, it loads the bubble chart perfectly
On the 3rd time I run it, I recieve the error: Error 1004: Unable to set the XValues of the Series Class While Range("datastart").Offset(rowoffset, intColNames).Value < "" intTemp1 = intTemp1 + 1 strXRange = Range("datastart").Offset(rowoffset intColXValues).Address strAddr1 = Range("datastart").Offset(rowoffset intColYValues).Address strAddr2 = "='Data'!R" & Range("datastart").Offset(rowoffset intColSize).Row & _ "C" Range("datastart").Offset(rowoffset, intColSize).Column With ActiveChart With .SeriesCollection.NewSeries .XValues = Sheets("Data").Range(strXRange) .Values = Sheets("Data").Range(strAddr1) .Name safeName(Replace(Range("datastart").Offset(rowoffs et, intColNames - 1) " ", "")) .BubbleSizes = strAddr2 'add data labels If Sheets("Data").Range(strXRange).Value < "N/A" Then .Points(1).HasDataLabel = True .Points(1).DataLabel.Text Range("datastart").Offset(rowoffset, intColNames) .Points(1).DataLabel.Position xlLabelPositionCenter .Points(1).DataLabel.Font.Size = 8.5 End If .Interior.PatternColorIndex = 19 .Interior.Pattern = xlSolid .Interior.ColorIndex CInt(Range("datastart").Offset(rowoffset, colorNum)) .Border.LineStyle = xlNone End With End With 'move to next row rowoffset = rowoffset + 1 Wen -- Message posted from http://www.ExcelForum.com |
All times are GMT +1. The time now is 08:24 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com