Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 393
  • Last Modified:

Command1.Enabled = False ??

I have a form with only one Command Button.  When the user clicks the button, I execute a sub which sets Command1.Enabled = False.  Before the sub returns, I re-enable the Command1 button.
Problem:
If the user clicks the button while it is disabled, the sub will execute again upon return.  Why is this? I thought disabling a control prevented the click event from entering the event queue.  Any suggestions?
0
Erick37
Asked:
Erick37
1 Solution
 
CardoCommented:
Have you tried putting a DoEvents in your code before you re-enable the button.  Incase it is queuing things until it gets a chance to process them?

Cardo......
0
 
Erick37Author Commented:
Thanks Cardo, that was the problem.  Submit it as an answer for the points.
Regards, Eric
0
 
eyaltilCommented:
please close the question
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now