I've got this Excel document which contains several charts which target Named Ranges that are all predefined. The problem is, the reference the chart needs have to include the name of the document for some reason. I've managed to add the filename of the document in the sheet. But I cannot target this cell directly when assigning the source of the chart.
So, when I edit the chart and select the source, it looks like this:
='MyExcelDocument.xlsm'!Graphs_TotCost
For some reason Excel doesn't understand when I target the cell that contains the filename. So I'll probably have to do this via a macro by first defining a string variable, assigning the document name to that string. And then assign the completed string combined with Graphs_TotCost. So, how do I select a chart that's in Sheet3 and change the source of that chart using a macro?