MsgBox timeout?

M

Maury Markowitz

I have a msgbox I use to stop processing just before saving a file. However
the users sometimes forget and walk away, so the file never gets saved.

Is there some way to have a timeout, so after 10 seconds (for instance) it
presses the OK/Cancel/whatever button?

Maury
 
D

Dirk Goldgar

Maury Markowitz said:
I have a msgbox I use to stop processing just before saving a file.
However the users sometimes forget and walk away, so the file never
gets saved.

Is there some way to have a timeout, so after 10 seconds (for
instance) it presses the OK/Cancel/whatever button?

The easiest way is to use your own dialog form instead of calling the
MsgBox function, and use the form's Timer event to do whatever is
necessary to close the form and return the default response.
 
Top