Hi Guys,
Can you help me out. I've cobbled together bits and pieces from around the internet and my code works almost fine. What it's suppose to do is look at a table and plot a bubble chart (each point being an individual series). However the problem I encounter is, when rows in the main data table are hidden/filtered the macro falls over.
Can anyone help me out? thanks
Sub BubbleLabel_Click()
Dim i As Integer
ActiveSheet.Select
Dim chtObj As ChartObject
For Each chtObj In ActiveSheet.ChartObjects
chtObj.Delete
Next
With ActiveSheet.ChartObjects.Add(Left:=50, Width:=500, Top:=50, Height:=300)
.Name = "BBChart"
For i = 1 To Range("Table1[Ideas Name]").Rows.Count
.Chart.SeriesCollection.NewSeries
.Chart.ChartType = xlBubble3DEffect
.Chart.SeriesCollection(i).Name = Range("Table1[Name]").Rows(i).Cells(1, 1)
.Chart.SeriesCollection(i).XValues = Range("Table1[SA]").Rows(i).Cells(1, 1)
.Chart.SeriesCollection(i).Values = Range("Table1[EoI]").Rows(i).Cells(1, 1)
.Chart.SeriesCollection(i).BubbleSizes = Range("Table1[Value]").Rows(i).Cells(1, 1)
Next i
end With
end Sub
Bookmarks