How to add a constant for For Next startValue.
If I define a constant in the App.Open Event (NOT using the IDE, so it’s not a type Number, but in the App.open Event)
Const WdSndKc As Integer = 6
I then try to use it in a FOR statement
For i = WdSndKc to ImgKc
I then get a does not exist error in a for statement
“ArManip.ArryFill, line 81
This item does not exist
For i = WdSndKc to ImgKc”
What is wrong?
I thought to stop the “does not exist” by adding Public but that just creates a syntax error. Not sure about that.
So What is wrong with using a Constant defined as Integer in a For statement?
Thanks, Julian. The things I didn’t try were adding App to the mentions, and adding it as a constant in a Module.
It’s good to know type number works.
I suspected incorrectly that type number wouldn’t work because of this discussion yesterday that mentions another discussion. expected-int32-but-got-enum-mnstuff-ck
I also thought it’d work since we now get in Desktop Project files kFileQuitShortcut as a constant. However, it is never mentioned.