Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Speed and size

Status
Not open for further replies.

Mollethewizard

IS-IT--Management
Nov 18, 2002
93
SE
Hello all gurus out there!

Can anyone tell me what is the most efficient regarding speed and size – one module with all subs in it or many modules with one or a few subs? Somewhere along the line I’ve heard that speed increases when VBA doesn’t need to resolve dots.

All the subs that I use frequently I’ve saved in a module called HM. Every time I need to make a CALL VBA has to resolve the dot (Call HM.Persnr e.g.) is this very speed limiting?

And finally document-size. Is the document going to be smaller when you have fewer modules in your VBA-project?

Christer
 
Hi
I can't answer your question fully but I can confirm the idea that the number of 'dots' slow processing - although I've never done anything that I've noticed this with!

eg
MsgBox Range("a1")
&
MsgBox Application.ThisWorkbook.ActiveSheet.Range("A1").Value
both give the same result but the former is supposed to be the quicker option. Certainly quiker to type!

Personally, if were to have more than 1 module I'd try to group routines that may rely on each other.

;-)

If a man says something and there are no women there to hear him, is he still wrong? [ponder]
The faqs ma'am, just the faqs. Get the best from these forums : faq222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top