Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copying data from one workbook to another | New Users to Excel | |||
Copying Formulas from Workbook to Workbook | Excel Discussion (Misc queries) | |||
Copying A Worksheet From Each Open Workbook to an new Workbook | Excel Worksheet Functions | |||
Copying charts from workbook to workbook | Charts and Charting in Excel | |||
Copying From workbook to workbook | Excel Worksheet Functions |