novel
New Member
- Joined
- Jan 16, 2012
- Messages
- 39
I am writing a sub that has 17 calls to different subs and functions. I broke it up in this way because it was easier to write smaller pieces since a lot of actions are repeated (e.g., copying and renaming worksheets) and it was easier to control the flow I diagrammed in advance. Some calls are one line long, but were broken out because they perform a specific action as diagrammed. I write the word Call for each.
I am wondering, however, if there are any performance concerns I should note with so many calls. I was reading on here about filling up a call stack? (I heard of the term in regards to C# debugging not sure how it is in VBA). I don't have any recursive calls.
Typically, would a sub perform faster just written as one (i.e., keep all the code in one sub) or with multiple calls? Is there a limit on the number of calls one should include in a sub before one starts to see negative impacts on performance?
Using XL2007 for Windows (7 and Vista)
I am wondering, however, if there are any performance concerns I should note with so many calls. I was reading on here about filling up a call stack? (I heard of the term in regards to C# debugging not sure how it is in VBA). I don't have any recursive calls.
Typically, would a sub perform faster just written as one (i.e., keep all the code in one sub) or with multiple calls? Is there a limit on the number of calls one should include in a sub before one starts to see negative impacts on performance?
Using XL2007 for Windows (7 and Vista)