I would like to be able to reference the next worksheet in a workbook using VBA, but avoid referencing the sheet name as I hope to be able to apply the macro to a number of different workbooks.
I am writing an Excel Macro which is for formatting an excel chart. In the chart's series title I would like to make the series name reference a cell in the next worksheet.
I have tried the following which is not working:
ActiveChart.SeriesCollection(1).Name = "='ActiveChart.Next.Select'!$B$1"
However this is not working.
What is the most effective way of getting the series name field of a chart to reference a cell in the following worksheet within a macro?
I have also tried the following, which does not work either:
ActiveChart.SeriesCollection(1).Name = "=Sheets(1)!$B$1"
Please bear in mind that this is a workbook which is structured with a chart, then a sheet, chart, sheet and so on...