Hello,
I am developing a few macros dealing with comments.
I notice that if a user happens to place (or accidentally leaves) his mouse cursor inside a comment box (e.g. after editing a comment), and then clicks on any macro button, the button does not work. He should first move his cursor out of the comment box before clicking on any macro button.
Worse, if I place the macro button in the Excel Ribbon, and the user clicks on any button while his cursor is inside a comment box, the program crashes.
Anybody has any idea how we can avoid this type of problem?
My preferred idea is that when a user clicks on any macro button, the button first checks if the cursor is inside any comment box. If yes, it will display a MsgBox "Please remove your cursor from the comment box!". How can this be done?
Alternative ideas are also welcome!
Thanks
Leon
I am developing a few macros dealing with comments.
I notice that if a user happens to place (or accidentally leaves) his mouse cursor inside a comment box (e.g. after editing a comment), and then clicks on any macro button, the button does not work. He should first move his cursor out of the comment box before clicking on any macro button.
Worse, if I place the macro button in the Excel Ribbon, and the user clicks on any button while his cursor is inside a comment box, the program crashes.
Anybody has any idea how we can avoid this type of problem?
My preferred idea is that when a user clicks on any macro button, the button first checks if the cursor is inside any comment box. If yes, it will display a MsgBox "Please remove your cursor from the comment box!". How can this be done?
Alternative ideas are also welcome!
Thanks
Leon
Last edited: