View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Leith Ross[_218_] Leith Ross[_218_] is offline
external usenet poster
 
Posts: 1
Default System Tray Notification/Alert


Hello Zachary,

Here are the API calls you will need to Flash the Application Title.
The macro Flash is a VBA routine. It should serve as model for you in
creating a suitable function for your needs.


Code:
--------------------

Public Declare Function GetActiveWindow _
Lib "User32.dll" () As Long

Public Declare Function Sleep _
Lib "Kernel32.dll" _
(ByVal dwMillisecs As Long) As Long

Declare Function FlashWindow _
Lib "User32.dll" _
(ByVal hWnd As Long, _
ByVal fInvert As Boolean) As Boolean

'The return value is the state of the window
'(active or inactive) prior to the call

Public Sub Flash()

Dim I As Integer
Dim Status As Long

For I = 1 To 7
Status = FlashWindow(GetActiveWindow(), Not Status)
Sleep (250)
Next I

End Sub

--------------------

Sincerely,
Leith Ross


--
Leith Ross
------------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465
View this thread: http://www.excelforum.com/showthread...hreadid=482351