View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Craig Remillard Craig Remillard is offline
external usenet poster
 
Posts: 9
Default Disable worksheet macros when copying a worksheet in VBA

I am using the worksheet.copy method to copy a worksheet intact. The source worksheet has a few event macros that I would like to disable in the destination worksheet.

I considered just copying the contents of the source to a new worksheet. However, the source worksheet contains some controls I would like to keep in the destination sheet. These controls call to module subroutines outside the worksheet.

I can see two possible solutions, but I do not know how to execute any of them:
1) Disable all worksheet VBA code for the destination worksheet
2) Copy the contents of the source worksheet, and then copy only the buttons I want to use.

Can someone point me to the method or function I can use for either strategy? Thanks, Craig.


Submitted via EggHeadCafe - Software Developer Portal of Choice
..NET Abstract Factory
http://www.eggheadcafe.com/tutorials...t-factory.aspx