function or call macro
Hi all,
Is there much of a difference between creating a function to use only in a macro or creating seperate macro's (not to be used independantly) and calling them from another master macro? Is one method faster than the other? I'm just looking for some best practice tips:-) Marko |
function or call macro
My understanding is that doing something inline is always faster than
calling a procedure external to the one that's running. Unless you have many calls to outside procedures, though, this difference will be imperceptible. -- Vasant "marko" <no@email wrote in message ... Hi all, Is there much of a difference between creating a function to use only in a macro or creating seperate macro's (not to be used independantly) and calling them from another master macro? Is one method faster than the other? I'm just looking for some best practice tips:-) Marko |
function or call macro
embedding the code in the primary macro will run faster
than writing a separate function and calling it from the primary macro. However, modularizing your code has its own advantages, e.g., much easy to write, understand, maintain, etc., and you are more likely to think about execution speed and efficiency when writing subroutines for reuse. Walkenbach's book, Excel 2000 Power Programming with VBA, discusses several exectution speed issues including the advantages of using Excel's built-in functions vs writing your own. -----Original Message----- Hi all, Is there much of a difference between creating a function to use only in a macro or creating seperate macro's (not to be used independantly) and calling them from another master macro? Is one method faster than the other? I'm just looking for some best practice tips:-) Marko . |
function or call macro
I'd go with well written functions rather than one long module. Easier to
maintain, more solid and doubtful there'll be a decrease in performance. "marko" <no@email wrote in message ... Hi all, Is there much of a difference between creating a function to use only in a macro or creating seperate macro's (not to be used independantly) and calling them from another master macro? Is one method faster than the other? I'm just looking for some best practice tips:-) Marko |
function or call macro
I ran across some general info on Excel speedups when
looking for something else; you may find it useful http://www.mvps.org/dmcritchie/excel/slowresp.htm -----Original Message----- Hi all, Is there much of a difference between creating a function to use only in a macro or creating seperate macro's (not to be used independantly) and calling them from another master macro? Is one method faster than the other? I'm just looking for some best practice tips:-) Marko . |
All times are GMT +1. The time now is 03:58 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com