Hi,
I have created an index in Excel that goes up by 1 everytime a macro is run. (cell c99 in Sheet1)
I.e. it starts at one, i run the macro and it now shows 2.
I wish to add some code to my macro which doesnt allow this addition to happen anymore, once my index number has reached 5, and for the macro to exit sub early.
So once the index reaches five, i wish for a message box to appear telling the user that this cant be done as the index is now too high, and for the code to exit sub prematurely.
Hope this makes sense and
Hope you can help,
Thank you very much!
P.
I have created an index in Excel that goes up by 1 everytime a macro is run. (cell c99 in Sheet1)
I.e. it starts at one, i run the macro and it now shows 2.
I wish to add some code to my macro which doesnt allow this addition to happen anymore, once my index number has reached 5, and for the macro to exit sub early.
So once the index reaches five, i wish for a message box to appear telling the user that this cant be done as the index is now too high, and for the code to exit sub prematurely.
Hope this makes sense and
Hope you can help,
Thank you very much!
P.
Comment