ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   disable macros? (https://www.excelbanter.com/excel-programming/344156-disable-macros.html)

me[_9_]

disable macros?
 
Hi, I am programatically copying worksheets from one workbook to another.
The macros come with the worksheet, which I don't want to happen. I can't
guaranteed the users will disable macros when opening the new workbook. How
can I easily:

1. Copy only the worksheet, not the underlying code, or
2. insert code that disables macros on open, or
3. programmatically save the file so macros are disabled next time it's
opened, or
4. manually save the file so that macros are disabled next time it's opened?
5. Do you have a simpler idea how to not copy, delete, or not execute code
for a whole bunch of worksheets?

Thank you,
Mike



Jim Thomlinson[_4_]

disable macros?
 
See if this fits the bill

http://www.cpearson.com/excel/vbe.htm
--
HTH...

Jim Thomlinson


"me" wrote:

Hi, I am programatically copying worksheets from one workbook to another.
The macros come with the worksheet, which I don't want to happen. I can't
guaranteed the users will disable macros when opening the new workbook. How
can I easily:

1. Copy only the worksheet, not the underlying code, or
2. insert code that disables macros on open, or
3. programmatically save the file so macros are disabled next time it's
opened, or
4. manually save the file so that macros are disabled next time it's opened?
5. Do you have a simpler idea how to not copy, delete, or not execute code
for a whole bunch of worksheets?

Thank you,
Mike





All times are GMT +1. The time now is 12:43 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com