Question: If VBA code declares FileCount as a constant rather than a variable, the code tends to run faster. Why is this?
- The scope of constants is limited to the procedure that declares them
- Constants are declared at compile time, but variables are declared at run time
- Once declared in a project, the value of a constant cannot be changed. There is no need to look up the current value of FileCount when it is a constant.
- The Const declaraton specifies the most efficient type given the constant's value
Answer: The correct answer of the above question is Option D:The Const declaraton specifies the most efficient type given the constant's value