I need some code that I can add to all of my forms type sheet buttons, that will prevent quick multiple clicks from running the routine multiple times. Possibly a timer if necessary, that will require waiting at least one or two seconds before clicking again. – Something simple, short and sweet, and generic, so that I can use it for most code situations within the button’s assigned macro.
For testing purposes I've attached a sample workbook that has the simplistic macro example shown below, assigned to a button.
Thanks
[vba]
Sub Macro1()
With ActiveCell
With .Interior
.ColorIndex = 6
.Pattern = xlSolid
End With
.Offset(1, 0).Select
End With
End Sub
hope you don't mind. I'm just am little desperate as I have one procedure for an app. currently in use at my work, that falls down big time if the code runs twice in quick succession by accidentally double clicking the button.