VB code

D

DJ

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
 
D

DavidP

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
 
R

RWN

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top