PC Review


Reply
Thread Tools Rate Thread

close msgbox with VBA code

 
 
=?Utf-8?B?SmF5IEphY29icw==?=
Guest
Posts: n/a
 
      24th Jun 2005
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
 
Reply With Quote
 
 
 
 
Douglas J. Steele
Guest
Posts: n/a
 
      24th Jun 2005
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



 
Reply With Quote
 
=?Utf-8?B?SmF5IEphY29icw==?=
Guest
Posts: n/a
 
      29th Jun 2005
I am working through a test scenario where I have added the vbCance. So far
so good.

Thanks
Jay

"Douglas J. Steele" wrote:

> 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

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
re:code to close an excel sheet without saving it .(via msgbox) Satyam Reddy Microsoft Excel Worksheet Functions 2 14th May 2008 02:48 PM
close msgbox =?Utf-8?B?RGFu?= Microsoft Excel Programming 4 30th Jul 2007 07:40 PM
Close a msgbox John Wright Microsoft VB .NET 2 22nd Apr 2006 06:36 AM
Close msgbox ? Buddy Lee Microsoft Excel Programming 3 22nd Nov 2005 04:14 PM
Close MsgBox dbl Microsoft Access Reports 3 24th Mar 2005 07:53 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:33 PM.