Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Can VBA copy all procedures from one worksheet module to another?
Hi All -
Is there a way to programmatically copy VBA code from one worksheet module to another in the same workbook? Copying the worksheet (and its code module) is not an option because we are looping through many copies and run into the documented Excel error associated with copying too many worksheets in the same workbook. Need something similar to Export File... and Import File..., but for worksheet modules. Also, it would be desirable not to have to export to an external file if possible. -- Jay |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Can VBA copy all procedures from one worksheet module to another?
Chip Pearson has some code that might help:
http://www.cpearson.com/excel/vbe.htm#CopyModule If you don't want to copy the whole module, browse around his site, I'm sure you can find something that will help. "Jay" wrote: Hi All - Is there a way to programmatically copy VBA code from one worksheet module to another in the same workbook? Copying the worksheet (and its code module) is not an option because we are looping through many copies and run into the documented Excel error associated with copying too many worksheets in the same workbook. Need something similar to Export File... and Import File..., but for worksheet modules. Also, it would be desirable not to have to export to an external file if possible. -- Jay |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Can VBA copy all procedures from one worksheet module to anoth
Thanks JLGWhiz. I'm adapting some of Chip's code now.
-- Jay "JLGWhiz" wrote: Chip Pearson has some code that might help: http://www.cpearson.com/excel/vbe.htm#CopyModule If you don't want to copy the whole module, browse around his site, I'm sure you can find something that will help. "Jay" wrote: Hi All - Is there a way to programmatically copy VBA code from one worksheet module to another in the same workbook? Copying the worksheet (and its code module) is not an option because we are looping through many copies and run into the documented Excel error associated with copying too many worksheets in the same workbook. Need something similar to Export File... and Import File..., but for worksheet modules. Also, it would be desirable not to have to export to an external file if possible. -- Jay |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Can you use "Target" in a Module besides the worksheet module | Excel Programming | |||
Dynamically create procedures in a sheet module | Excel Programming | |||
Calling worksheet module from other module. | Excel Programming | |||
Run worksheet module code from workbook module? | Excel Programming | |||
calling procedures from worksheet buttons | Excel Programming |