Depending on your exact situation, it can be done using the FindWindow and
SendMessage APIs.
Karl E. Peterson has an example at
http://vb.mvps.org/samples/project.asp?id=TimedMsg that works fine in
Access.
One caveat, though: the message box MUST have a Cancel button on it for this
to work. If you've only got Yes and No buttons, for instance, it will not
work.
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
"Jay Jacobs" <(E-Mail Removed)> wrote in message
news:9797F815-D4AC-4D01-BE01-(E-Mail Removed)...
>I have an app that times out if inactive greater than 5 minutes.
> Occasionally it is hung up by one of many messageboxes that does not close
> when the app times out. I have found solutions for vbinformation or
> vbcritical, however, what is the best way to code the messagebox to close
> when it is a vbyes vbno or one with multiple choices?
>
> Thanks
> Jay