Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8401075
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T21:42:47+00:00 2026-06-09T21:42:47+00:00

I have some button controls which fire off lengthy processing. Do I have to

  • 0

I have some button controls which fire off lengthy processing. Do I have to worry about the user pressing the button and firing off another execution while a first execution is active?

I found I could use the click events to disable the button, call the processing routine, and then enable the button. But this seems fraught with danger if the processing routine fails.

I could add on error stuff in the click routine to catch failures but would any on error calls in the processing routine cancel those out?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T21:42:48+00:00Added an answer on June 9, 2026 at 9:42 pm

    Do I have to worry about the user pressing the button and firing off
    another execution while a first execution is active?

    No – as long as there’s no chance there’s any code in your processing which calls DoEvents.

    Try assigning the following code to a button in your worksheet (you may need to adjust the iterators higher to get sufficient runtime) and clicking an additional button – or doing anything else in Excel for that matter.

    Sub test()
        For i = 1 To 100
            For j = 1 To 100
                Range("A1").Select
            Next j
    
        Next i
    End Sub
    

    An added bonus is it helps illustrate how .select causes slower operations in working with Excel…

    I found I could use the click events to disable the button, call the
    processing routine, and then enable the button. But this seems fraught
    with danger if the processing routine fails.

    It is probably a good idea to include some sort of error handling regardless of simply reenabling buttons for any meaningful operations unless you are the sole user.

    I could add on error stuff in the click routine to catch failures but
    would any on error calls in the processing routine cancel those out?

    You would have to properly account for errors and the different places. The answer to this is “it depends on your implementation.”

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple user control that contains some buttons that fire events which
I have a datalist control which some controls(ex: button) are in it. I want
In my application,i have some .strings files.And on a button click,which is on my
I currently have some code which when you press the submit button, a marker
I have a page with user controls getting dynamically added. Inside some of these
I have some html controls which default display value is none. I have anchor
I have a ASPX Page that contains several user controls, which are loaded dynamically
I am having an ASP.WebSite in which I have added some form controls dynamically
I have a FrameLayout view which contains one (MapView-like) control and some additional buttons
I have some code that dynamically creates a new button through JavaScript that when

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.