ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Message Box (https://www.excelbanter.com/excel-programming/354207-message-box.html)

PBANKS[_6_]

Message Box
 

Is it possible to answer "Yes" or "No" to a message box through VBA
without actually doing it manually?


--
PBANKS
------------------------------------------------------------------------
PBANKS's Profile: http://www.excelforum.com/member.php...o&userid=31370
View this thread: http://www.excelforum.com/showthread...hreadid=515928


Dave Peterson

Message Box
 
If you know what the answer is, why bother asking?

This seems to work under some versions of windows:

CreateObject("WScript.Shell").Popup "Hello", 4, _
"This closes itself in 4 seconds"

But it doesn't work in all versions of windows.

Maybe designing a userform would be best.



PBANKS wrote:

Is it possible to answer "Yes" or "No" to a message box through VBA
without actually doing it manually?

--
PBANKS
------------------------------------------------------------------------
PBANKS's Profile: http://www.excelforum.com/member.php...o&userid=31370
View this thread: http://www.excelforum.com/showthread...hreadid=515928


--

Dave Peterson

Dave Peterson

Message Box
 
And then use application.ontime to dismiss it.

Chip Pearson has lots of instructions at:
http://www.cpearson.com/excel/ontime.htm

PBANKS wrote:

Is it possible to answer "Yes" or "No" to a message box through VBA
without actually doing it manually?

--
PBANKS
------------------------------------------------------------------------
PBANKS's Profile: http://www.excelforum.com/member.php...o&userid=31370
View this thread: http://www.excelforum.com/showthread...hreadid=515928


--

Dave Peterson

PBANKS[_7_]

Message Box
 

Outlook security is the reason, found "click yes" on the web. Works
great!


--
PBANKS
------------------------------------------------------------------------
PBANKS's Profile: http://www.excelforum.com/member.php...o&userid=31370
View this thread: http://www.excelforum.com/showthread...hreadid=515928



All times are GMT +1. The time now is 06:45 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com