questions about Public Constants

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Terrell Miller (millerto_at_bellsouth.net)
Date: 09/03/04


Date: Fri, 3 Sep 2004 12:49:48 -0700

Two questions:

*I usually use a Globals module in my projects that has a
huge list of either global or public-level constants.

I'm wondering if there are any performance issues when
there are a lot of public variables/constants defined. I
type them all and use Variant rarely, but I'm wondering if
having a lot of String, Integer, etc. publics has a big
effect on the amount of RAM the app chews up or the speed
of the VBA environment.

*Similarly, are there any noticeable performance issues if
I have several subroutines and functions in my form
modules? I try to use only sub/function calls as much as
possible in my handlers, but in cases where a subroutine
is particular to a specific form I've kept the
sub/function on that form's module. These subroutines are
not huge, <100 lines of code each and I might have a total
of ~500 lines of code for all the subs/fxns in a given
form module.

Does this bloat the form size quite a bit or slow
loading/execution?

Thanks for your help,

Terrell