Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

msgbox interferring with the timer event executing

Status
Not open for further replies.

chiefvj

Technical User
Feb 4, 2005
73
US
T have a timer event that closes a database application whenever there is no user activity on a form for over 20 mins. However, if one of many VB message boxes are waiting for a prompt from a user, the timer event to close the appication is never executed... Any ideas on how to close the msgbox using code??
thx for your help in advance.
 
I'm not sure you can (easily). There's probably an API call to do it but I'm not sure this would be the best option.

Could you replace the MsgBox with a custom dialog form instead?

Ed Metcalfe.

Please do not feed the trolls.....
 
I was planning on that but I wanted to see if there was an easier fix.
Thx for you help
 
I suppose there's always the quick and dirty SendKeys, but it's far from satisfactory...

Ed Metcalfe.

Please do not feed the trolls.....
 
Could you fill me in on the "quick and dirty Sendkeys"??
thx
 
Sorry, I was thinking you could use SendKeys to send an {Enter} keystroke but actually this won't work. Sorry!

Ed Metcalfe.

Please do not feed the trolls.....
 
Ed,
Thank you very much..A simple but elegant bit of coding. Thanks for pointing me in the right direction.
fredp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top