#1   Report Post  
Posted to microsoft.public.excel.programming
DJ DJ is offline
external usenet poster
 
Posts: 13
Default VB code

I have some VBA code that loops thru sheets and protects
them (or unprotects dependant on a variable).
Unfortunately, everytime it runs- excel thumbs thru the
sheets and you can see the process happen (similar to if I
recorded a macro). Most of the time the code happens in
the background without visibly thumbing thru sheets, is
there a way to hide what the code is doing in this
particular case or does it need to have the sheet
activated in order to protect it?

BTW- I hope I'm not abusing this forum by asking too many
questions :| They've just been building up and now I have
a place to get them answered

thnx in advance
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default VB code

Add the following line at the beginning of your macro

Application.screenupdating = false

No movement will be seen when you run the macro

I don't think anyone minds how often you post. The main thing is to
make sure your questions are easily understood. If necessary post
sample data to explain what you are doing but NEVER, NEVER, NEVER
attach spreadsheets as they will be ignored by most readers

DavidP

On Fri, 7 Nov 2003 22:09:10 -0800, "DJ"
wrote:

I have some VBA code that loops thru sheets and protects
them (or unprotects dependant on a variable).
Unfortunately, everytime it runs- excel thumbs thru the
sheets and you can see the process happen (similar to if I
recorded a macro). Most of the time the code happens in
the background without visibly thumbing thru sheets, is
there a way to hide what the code is doing in this
particular case or does it need to have the sheet
activated in order to protect it?

BTW- I hope I'm not abusing this forum by asking too many
questions :| They've just been building up and now I have
a place to get them answered

thnx in advance


  #4   Report Post  
Posted to microsoft.public.excel.programming
RWN RWN is offline
external usenet poster
 
Posts: 104
Default VB code

And don't forgrt to set it back to "True" when you're finished or, as I
found out, it becomes very interesting!.

--
Regards;
Rob

Please reply to the NG I'm already up to my eyeballs in Nigerian/South
African get rich letters as well as "Microsoft Critical Updates" et al.


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
split post code (zip code) out of cell that includes full address Concord Excel Discussion (Misc queries) 4 October 15th 09 06:59 PM
Code to conditional format all black after date specified in code? wx4usa Excel Discussion (Misc queries) 3 December 26th 08 07:06 PM
Drop Down/List w/Code and Definition, only code entered when selec Spiritdancer Excel Worksheet Functions 2 November 2nd 07 03:57 AM
Convert a Number Code to a Text Code Traye Excel Discussion (Misc queries) 3 April 6th 07 09:54 PM
copying vba code to a standard code module 1vagrowr Excel Discussion (Misc queries) 2 November 23rd 05 04:00 PM


All times are GMT +1. The time now is 04:00 AM.

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

About Us

"It's about Microsoft Excel"