ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Disable Code (https://www.excelbanter.com/excel-programming/283953-disable-code.html)

Alan

Disable Code
 
Hi,
I have a file with a lot of code in it, Macros and Events etc. The goalposts
have moved and I have to alter it a bit. Is there a way to stop any kind of
code from executing to make editing easier?
I know I can open it with Macros disabled then reopen to see if it works,
but it does get very tedious that way..
I've tried
Application.EnableEvents=False in a Macro
But some of the code still seems to run anyway,
Anyone know a way to completely disable all code from running with Macros
Enabled?
Thanks,
Alan.





gocush[_23_]

Disable Code
 

Depending on how many macros you have or need to disable, might try a
low tech method:

add this as the first line in each macro you want to disable:

exit sub

Then go thru them individually, debugging or editing as needed.


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/



All times are GMT +1. The time now is 12:50 AM.

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