I'm working on a workbook and calculate some values, based on which I create a graph. There is a new workbook created earlier in my code to which i would like to paste the new graph. Some of my code
I don't use variable wbk anywhere else but in the part where I try to copy the chart:
This however pastes the chart back to the original workbook instead of the new one. Where is the problem.
Public wbk As Workbook Set wbk = Workbooks.Add ' I use this to identify the new workbook
ActiveSheet.ChartObjects("RadarGraph").Activate 'original workbook chart ActiveChart.ChartArea.Copy ' here I copy the chart from original workbook wbk.Activate 'here I try to activate the wbk workbook - new workbook that was created earlier Worksheets("Results").Activate 'Here I activate the worksheet on the new workbook (it has the same name as the worksheet i was working with the original workbook Worksheets("Results").Paste 'here I paste the chart