PDA

View Full Version : Do All Modules Get Loaded??



Cyberdude
05-10-2006, 02:21 PM
Consider the following statements:

"When a workbook is opened, ALL of its modules are also loaded. Modules are NOT loaded on an "as needed" basis."

Can anyone say with certainty that those two sentences are correct?

Killian
05-10-2006, 04:34 PM
A standard module is loaded when the workbook is opened. This is when any global variables, constants, etc are initialized.
A class module (which includes userforms) is loaded when its instanced or "as needed"

Cyberdude
05-10-2006, 05:27 PM
When you say "a standard module" is loaded, I shall assume that means "ALL standard modules", which would have been my guess. I was just hoping it was otherwise. (Sigh) But thanks a load Killian. It sounds like you know what you're talking about, and I'm sure you do. :bow: