i have a button on the sheet that starts a macro.
the problem is that you can press the button several times and the macro will run several times and make a big mess.
how can i stop that?
can i find out if the macro count_salary is running?
i have a button on the sheet that starts a macro.
the problem is that you can press the button several times and the macro will run several times and make a big mess.
how can i stop that?
can i find out if the macro count_salary is running?
If you can press the button, the macro is not running.
If re-running a routine will foul the data, you could either add a bit at the start of the macro to test if the sheet is OK to alter or you could have the user answer a "Do you want to do this?" MsgBox.
Hide the button at the end of the macro.
____________________________________________
Nihil simul inventum est et perfectum
Abusus non tollit usum
Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
James Thurber