or when the program stops click on Debug and then you can print the value of Index in the immediate window.

How have you dimensioned msngMouseX?