![]() |
copying modules from one workbook to another workbook
I'm having 2 workbooks. I wanted to copy some of the modules from workbook1
to workbook2. Note: Both workbooks are opend. Please help me out by providing relavent VBA code. Advanced Thanks, Vinod |
copying modules from one workbook to another workbook
Why can't you just use copy and paste?
Pete On Sep 18, 6:21*pm, Vinod wrote: I'm having 2 workbooks. I wanted to copy some of the modules from workbook1 to workbook2. Note: Both workbooks are opend. Please help me out by providing relavent VBA code. Advanced Thanks, Vinod |
copying modules from one workbook to another workbook
Right-click on a module in book1 and Export as a *.bas file.
In book2 right-click on a module and Import File Do this a few times and you've got the modules copied. To do it programmatically see Chip Pearson's site http://www.cpearson.com/excel/VBE.aspx Copy A Module From One Project To Another Gord Dibben MS Excel MVP On Thu, 18 Sep 2008 10:21:02 -0700, Vinod wrote: I'm having 2 workbooks. I wanted to copy some of the modules from workbook1 to workbook2. Note: Both workbooks are opend. Please help me out by providing relavent VBA code. Advanced Thanks, Vinod |
copying modules from one workbook to another workbook
Thanks Gord Dibben.
I captured code from provided link and I achieved it partly which is failing in saving file after copying code from a module to 'Thisworkbook' and deleted unnecessary modules. At the end of copy and delete process I've wrorte like this: thisworkbook.save while executing 'save' statement I got a message saying that 'Document not save' with 'Ok' option. Is there any workaround for this. Please share your thoughts and relavent code which will be appreciated. Advanced Thanks, Vinod "Gord Dibben" wrote: Right-click on a module in book1 and Export as a *.bas file. In book2 right-click on a module and Import File Do this a few times and you've got the modules copied. To do it programmatically see Chip Pearson's site http://www.cpearson.com/excel/VBE.aspx Copy A Module From One Project To Another Gord Dibben MS Excel MVP On Thu, 18 Sep 2008 10:21:02 -0700, Vinod wrote: I'm having 2 workbooks. I wanted to copy some of the modules from workbook1 to workbook2. Note: Both workbooks are opend. Please help me out by providing relavent VBA code. Advanced Thanks, Vinod |
All times are GMT +1. The time now is 01:00 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com