ouestque
asked on
Excel VBA: Copy chart under different name
What VBA would I need to copy a chart to another sheet in the same place but with a new name and half its normal size.
In this case assume:
*The chart is titled "Chart1" on "Sheet1" and it is going to be copied to "Sheet2" with the name "New_Chart1"
*There are already various other random charts on Sheet1 and sheet2 with different names.
In this case assume:
*The chart is titled "Chart1" on "Sheet1" and it is going to be copied to "Sheet2" with the name "New_Chart1"
*There are already various other random charts on Sheet1 and sheet2 with different names.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Yes, it should work as it will always refer to the latest ChartObject copied to the Sheet2. Did it not work for you?
ASKER
Thank you Subodh!
You're welcome!
ASKER
Example: (Doesn't work)
Set ch2 = ws2.paste