Copy code using VBA to another worksheet's charts

halo_

New Member
Joined
Feb 1, 2018
Messages
2
Hi all, newbie over here! :LOL:

I am trying to capture co-ordinates on a graph, creating tangents across those points and then determining the intersection point. I have managed to do that with a Shift+click MouseDown combination, but I need to be able to turn this into an add-in in order to use it across any graph, rather than just the one graph it's written in. It includes a UserForm, which allows the user to tell the code which point is being clicked.

But I'm now stuck! I can import the UserForm into another workbook, and the accompanying code inside it, but the bulk of the code sits inside the Chart sheet itself. How do I get VBA to copy that to any/all chart sheets in the new workbook?

Thanks in advance!
Helen
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
not sure if this helps but can you save the chart as a template then use the template to create future charts how you want and then run the code?
 
Upvote 0
not sure if this helps but can you save the chart as a template then use the template to create future charts how you want and then run the code?

Potentially... The original data to be analysed comes from a different piece of equipment so I'm not sure but I will look into this as an option! Thank you.
 
Upvote 0

Forum statistics

Threads
1,214,821
Messages
6,121,759
Members
449,048
Latest member
excelknuckles

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top