Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 249
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 389
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default 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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
I am trying to create a spreadsheet for businesses within zip code SM1 Excel Worksheet Functions 2 January 24th 07 11:18 PM
VB code to copy sheet format to another sheet ASU Excel Discussion (Misc queries) 12 August 10th 06 02:37 AM
Copy code to a new spreadsheet Markl Excel Discussion (Misc queries) 3 March 29th 06 03:54 PM
Enabling macros while the sheet being protected ! dinesh Excel Discussion (Misc queries) 13 September 27th 05 08:47 PM
Can i see code and spreadsheet simultaneously Stuart New Users to Excel 1 August 26th 05 03:34 PM


All times are GMT +1. The time now is 11:15 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"