Runtime
This is a synopsis, but not necessarily complete.
Runtime is while the code is executing.
Memory usage is the storage required to compile
and execute a procedure.
'
If..Then..Else sets a condition which if met, or
not met will result in some response, or lack of
response as determined by the user, with the
Else occuring when the first condition does not
apply.'
The Switch function provides a facility to use
different definitions for the same variable and
match the definitions modifier for each switch.'
I don't know that you could say any two are
equivalent, but you could conceivably get a similar
result using Switch in place of an If...Then.
For more information, refer to the VBA help files.
"Brent" wrote:
Does anyone know the difference in runtime and memory usage for
IF..Then..Else and a Switch statement in VBA, when the two are equivalent
expressions? Thank you.
Brent
|