Consulting

Results 1 to 4 of 4

Thread: Solved: How can I prevent Button Double clicks?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    VBAX Expert
    Joined
    Sep 2010
    Posts
    604
    Location

    Solved: How can I prevent Button Double clicks?

    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

    [/vba]
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •