I have always assumed that id is the value of the Control entering the SUB and does not change.
I think that I must be suffering from Virus-induced anxiety!
Please notice I'm not judging your approach, but rather trying to understand your logic, so I can help further.@FellippeHeitor Not judging my approach: that's a good thing because it was your approach! When I was actually doing this project (as opposed to now when I'm tarting up a few loose ends), you were spoon-feeding me. In this __UI_KeyPress subroutine, but further down and not shown here, there is an array of text boxes (7 x 11) each needing input and data manipulation at some stage, and to use the actual id Names would have been extremely unwieldy, and so you got me to convert the Control Names into a number array. That just made the coding a good deal easier to do and understand. WhichIsIt% is a function to convert id into the array index. Honestly, it does make the coding simpler (and more fun) than than if the Control name is used.
I am thankful to Pete for pointing out where my error was occurring.
I'm glad to say that the anti-virus has worked perfectly - I'm just as stupid as I was before all this!
WhichIsIt% was a Function of mine which I used to convert the id numbers into CtrlIndex% which is then used (the program knows what the value of CtrlIndex% is). Actually, because of tidying up I removed WhichIsIt% (which was only required once after tidying) and put the translation code at the beginning of the SUB in question.