Thread: [Solved] Global variables
View Single Post
 
Old 05-06-2019, 06:34 AM
inlanoche inlanoche is offline Windows 10 Office 2016
Novice
 
Join Date: Apr 2019
Posts: 14
inlanoche is on a distinguished road
Default

Thanks for the input on this.

It cannot be a constant, as it would be set by a user selection. This selection needs to be kept as long as the document is open (or another selection changes it). This initial value should be set as the beginning of the use of these scripts. A null value is expected to error check if other parts of the code is used out of turn, which direct the user to proper usage.

So a global var is the only thing I can think of. Other parts of the process 'stamp' a value at the end of the document in a protected area, but as the role can be changed during the use of the document, and these stamps are there from the first usage of the code, I cannot rely on that as a reference point. It needs to be something set only after the code is started, and should have a null value before that.
Reply With Quote