View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] kevin.bourque@gmail.com is offline
external usenet poster
 
Posts: 5
Default VBA compiled - affects conditional compile?

I've recently discovered conditional compiling in VBA using the
hash-const (#Const). (Many thanks to Jim Thomlinson in this group.)

However, I'm not totally comfortable or familiar with the methods VBA
uses when compiling when a particular module or procedure is called.
I'm trying to determine if conditional compiling would help speed up my
application.

More specifically, I have a long Case statement which chews up time and
makes the screen flicker. I'm trying to determine if converting the
Case statement with a conditionally compiled #If...#ElseIf...#ElseIf
would eliminate unnecessary code to be compiled. However, if the
on-the-fly VBA compiling steps through the conditional code anyways,
there is no advantage.

Is there a resource somewhere which explains how VBA is compiled, what
steps it goes through, and how one may optimize one's code for
compilation time?

Many thanks,
Kevin