In terms of execution speed, is it better to have one big macro performing many tasks or many small macros performing a few number of tasks?
In terms of execution speed, is it better to have one big macro performing many tasks or many small macros performing a few number of tasks?
Last edited by Pichingualas; 03-02-2012 at 12:14 PM.
You can only run one at a time so it won't really make any difference as far as I know. The general rule is to try and break your code down into small chunks to make it easier to understand and debug and to avoid repetition if you have bits that can be reused.
Dom
"May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."
Use code tags when posting your VBA code: [code] Your code here [/code]
Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.
Ok but breaking down the code into smaller chunks won't have any effect on the time they all take to run then?
I don't think so. Avoiding selecting cells, switching off calculation when you can and screen updating are the places to start.
Dom
Do as little writing operations as possible.
Ok thanks guys, I guess I can't improve the time it takes unless a use a better computer, since I've done all the things you say. Thanks for your replys.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks