![]() |
enabling/disabling a set of code from within a spreadsheet sheet
I have some visual basic code on a sheet which i use to provide a certain
layout of the sheet for printing. The nature of the code is complicated and slows the spreadsheet down when i am editing it. Is there an easy way to deactivate the code temporarily so that i can edit the spreadsheet without the code being active? At present i have to manually delete the entire code and then re paste it to reactivate it. It would be great if i could set up a macro such that I could push a button on the sheet to deactivate and activate the code |
enabling/disabling a set of code from within a spreadsheet sheet
Aside from creating a flag and adding to the macro, you could just click the
Design Mode icon on the Visual Basic toolbar, which won't allow code to run, then exit design mode when the macros should run. -- Tim Zych SF, CA "Roger on Excel" wrote in message ... I have some visual basic code on a sheet which i use to provide a certain layout of the sheet for printing. The nature of the code is complicated and slows the spreadsheet down when i am editing it. Is there an easy way to deactivate the code temporarily so that i can edit the spreadsheet without the code being active? At present i have to manually delete the entire code and then re paste it to reactivate it. It would be great if i could set up a macro such that I could push a button on the sheet to deactivate and activate the code |
enabling/disabling a set of code from within a spreadsheet sheet
Maybe disable events while you are editing.
Sub disable_events() Application.EnableEvents = False End Sub Do your editing here then.......... Sub enable_events() Application.EnableEvents = True End Sub Gord Dibben MS Excel MVP On Fri, 16 Nov 2007 21:20:01 -0800, Roger on Excel wrote: I have some visual basic code on a sheet which i use to provide a certain layout of the sheet for printing. The nature of the code is complicated and slows the spreadsheet down when i am editing it. Is there an easy way to deactivate the code temporarily so that i can edit the spreadsheet without the code being active? At present i have to manually delete the entire code and then re paste it to reactivate it. It would be great if i could set up a macro such that I could push a button on the sheet to deactivate and activate the code |
All times are GMT +1. The time now is 08:28 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com