Thread: Const?
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz[_2_] JLGWhiz[_2_] is offline
external usenet poster
 
Posts: 1,565
Default Const?

The answer to the first question is yes.



"Joe User" <joeu2004 wrote in message
...
If I declare "Const foo as Integer = 123", does that allocate storage?

Or does that create a compile-time constant that replaces "foo" wherever
it is used in executable statements?

If the latter, is "Const foo as Integer = 123*456" and "x = foo" more
efficient than "x = 123*456"? In particular, does the compiler treat "x =
foo" as "x = 56088"?