I am currently studying VBA and im currently on a chapter about declaring variable and constants.
I was hoping someone could help explain a little more clearly why one would bother declaring a constant.
The example in the book is:
Const myMonths as Integer = 12
Why would you not use 12 as the code throughout the macro if it was never going to change, being a constant.
Also, why not use the same Dim myMonths as Integer?
Thanks,
Coryj5
I was hoping someone could help explain a little more clearly why one would bother declaring a constant.
The example in the book is:
Const myMonths as Integer = 12
Why would you not use 12 as the code throughout the macro if it was never going to change, being a constant.
Also, why not use the same Dim myMonths as Integer?
Thanks,
Coryj5