Excel macro turn off screenupdating doa updatingtable
Copy any good ideas you come across to speed up your code than trying to re-invent.
Turn screen updating off to speed up your macro code.
You won't be able to see what the macro is doing, but it will run faster.
Dave Oz Grid Business Applications This archive is from the original message board at Microsoft Excel is a registered trademark of the Microsoft Corporation.
Visit our online store to buy searchable CD's with thousands of VBA and Excel answers.
What you need to do is write your code in such a way that no Selecting or Selection etc is in it.
You can as has been suggested resort to: Application.
As an exercise, take your most complex macro and see if you can delete a line.
Repeat this until there is nothing else you can remove. Some ideas to consider: Learning & practicing is a proven path to perfection.
I have a number of macros set up to run at the click of a button(s) that refer to other sheets in the workbook. add a routine to your macro that turns off screen updating, un-hide the sheet, run the macro, hide the sheet, turn screen updating back on. Mr Excel is a registered trademark of Tickling Keys, Inc.
I wish to hide these other sheets so that no one can see them but everytime I do this the macro doesn't work. I'm not sure the syntax is exactly correct, but it would be something like:application.screenupdating = falsesheets("sheet1").visible = true***your macro heresheets("sheet1").visible = falseapplication.screenupdating = true HTHMark Hi There should rarely be a need to have a sheet Visible or Active when running VBA code.
Objects like Application have many useful methods that can do what you want. If you can do the same thing without a loop, do it. Think thru the problem and see what is the best way to loop.