ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to send an alert message to other apps? (https://www.excelbanter.com/excel-programming/277197-how-send-alert-message-other-apps.html)

dchow

How to send an alert message to other apps?
 
I am running a lengthy process. Is there a way that I can pop up a
message from Excel while I am working in another application?

dchow

How to send an alert message to other apps?
 
Thanks


On Fri, 19 Sep 2003 08:30:02 -0700, "Jake Marx"
wrote:

Hi dchow,

I think you'll have to use the Windows MessageBox instead of Excel's. To do
this, put the following 2 declarations in a Standard Module (outside of all
procedures at top of Module):

Public Const MB_SYSTEMMODAL = &H1000&

Public Declare Function MessageBox Lib "user32" _
Alias "MessageBoxA" (ByVal hwnd As Long, _
ByVal lpText As String, _
ByVal lpCaption As String, _
ByVal wType As Long) As Long

To use it:

MessageBox 0, "test" & vbNullChar, "test" & vbNullChar, _
MB_SYSTEMMODAL




All times are GMT +1. The time now is 08:22 AM.

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