Catching menu item click event

  • Thread starter Thread starter Jill
  • Start date Start date
J

Jill

I am coding an Outlook addin using Visual Basic and CDO. In my addin,
I have added several items to the "Tools" menu. One of these menu
items starts a process that can take several minutes to complete. A
second menu item becomes enabled only when this process is running, and
this second menu item is used to stop the process started by the first
menu item.

I am able to catch the menu button click event and start the process
with no proplems. I have added a DoEvents call into the main loop of
my proccess to allow events to be handled while the process is still
running. I am able to catch serveral types of events while the process
is running. However, I cannot catch another menu button click event
while the process is still running, i.e. while the first menu button
click is still being handled.

Any ideas why i am unable to catch the second menu button click event?
An ideas how to fix/circumvent this issue?

Thanks!
 
Use a timer control to start up your long running process. Set the timer
control to ON when the first click event fires. The timer will fire after
that and start your process, which will allow the first Click event
procedure to complete before the process starts and therefore your second
click will fire.
 
Back
Top