Personally, I don't consider this statement...
cnt = (cnt + 1) Mod 100001
to be unclear, unobvious nor 'clever' in the sense I think you mean it. I
find the above line to be every bit as understandable as the multi-line code
you posted; but, of course, that is probably because I am intimately
familiar with the Mod operator and how it works. The Mod operator (like its
worksheet formula counterpart) can be a powerful programming tool when used
with cyclical counting type processes (such as in this thread's subject
matter or with calendar and time calculations) and I think it is one
programmers should be introduced to if they are unfamiliar with it. My hope
is that by my posting the equivalency of the above statement to your posted
code, it might spark some programmers out there who experience a "Wow!"
moment over it to take the time to learn more about this operator; those for
who do not experience such a moment, well, nothing is really lost as they
will simply read over it and move on.
Rick