Moving vba code from one workbook to another (using vba)

AidanKing

New Member
Joined
Feb 2, 2016
Messages
4
Hi,
I have created a workbook with some code running on each sheet. The code allows a user to select multiple items from a drop down list (rather than only one as allowed by "Data Validation" too)l. If I select some of the data on one of the sheets (for one user for example) and move it to a new workbook is there any way to move the code at the same time so the new user can continue using the code but on this new workbook?
thanks in advance.
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
My guess, without seeing your code, is no for simple copy paste. Doing it in a macro would depend on your code. Likely, a VBAComponents method would be needed.

A copy of the worksheet to a new or existing workbook "might" work. Again, it depends on your code.
 
Last edited:
Upvote 0
thanks Kenneth, A move/copy of the worksheet to a new workbook does work, I might have to go down that route and remove any unneeded data from there rather than before the move, just have to manage that in vb now. thanks for your help.
 
Upvote 0

Forum statistics

Threads
1,224,745
Messages
6,180,700
Members
452,994
Latest member
Janick

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