You are possibly missing some information. Yes, the chart will update automatically the values WITHIN the (Chart) RANGE specified. You can actually see this with adding:
Exit sub
After the oRange.refresh()
line. All seems to work fine in this case.
With that in place, expand the Base result to have more than 15 lines. Anything beyond B15 will NOT appear in the chart. That is because it’s dimensions are fixed from when the chart was created. The Chart does NOT see the new Range dimensions. That changes when you execute oChart.setRanges(Array(oAddress))
. The macro alters the dimensions based upon the amount of data retrieved from Base. It could be less or it could be more.
That is a partial reason why I presented in my comment to you using two different Ranges. Using a single Range AND adjusting the Chart Range via the macro.
So bottom line is that with your setup and never more than 14 lines of data you only need to refresh the Base data - do it from menu.