• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 356
  • 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

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

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