closing msgbox in vba code

S

Stephen Haley

I am stuck
I have developed an access app wich under certain circumstances will display
a msgbox using the standard msgbox function. I am now trying to implement
timers for the application as a whole so that it is automatically closed if
the user does nothing for 80mins. The problem I have is that I cannot
sucessfuly use application.quit if a msgbox has currently got the focus. Is
there anyway I can close it from within the vba timer module? I suspect this
may need an api call ie enumerate child windows etc but how do you tell that
a msgbox has currently got the focus and what the hwnd is?

thanks in advance
stephen
 
S

Stephen Haley

will remember for next time but not an option here
Thanks for the help - have now managed to put together a string of apis that
deal with it. Closing boxes with the red cancel cross enabled was reasonably
easy but had some problems with the vbyesno as they have no cancel but
eventually sorted that with the usual mishmash of various peoples offerings.
Will post the resultant here if anyone is interested
rgds
stephen
 
G

Guest

I would be interested in how you fixed this. I have just ran across the same
issue with an app that has many msgboxes and a 7 minute system timer.
TIA
Jay
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top