Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default 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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default 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




  #3   Report Post  
Posted to microsoft.public.excel.programming
MWE MWE is offline
external usenet poster
 
Posts: 20
Default 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


.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 58
Default 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




  #5   Report Post  
Posted to microsoft.public.excel.programming
MWE MWE is offline
external usenet poster
 
Posts: 20
Default 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


.

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
Call Macro jswalsh33 Excel Discussion (Misc queries) 2 February 21st 10 10:38 AM
How to call a COM add-in function from macro in Excel 2007 Sink0 Excel Discussion (Misc queries) 1 January 11th 10 06:47 AM
How can run a macro ( call a macro) on selection of any filtercriteria? [email protected] Excel Worksheet Functions 7 February 20th 09 12:34 AM
Call an Access macro from an Excel macro Jason W Excel Discussion (Misc queries) 1 May 1st 08 08:33 PM
macro call Steve Excel Discussion (Misc queries) 12 August 25th 06 04:27 AM


All times are GMT +1. The time now is 12:00 PM.

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"