LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 158
Default Timed Message Box Issue

Hello,

I am using a variation of the code below (from
http://www.xldynamic.com/source/xld.xlFAQ0022.html).

My issue is: every once in a while, the message window is not on top (ie:
usually a user clicks another window). It seems that the popup timer stops
counting until the message window is back on top.

Question: Is there any way to keep the message window on top?

Example Code:
Private Const TM_TEXT As String = "Press OK or Cancel, or just wait to
timeout"
Private Const TM_TITLE As String = "Timed Msgbox Example"
Private Const TM_DURATION As Long = 5 'seconds
'-------------------------------------------------------------
Sub TimedMsgbox()
Dim WSH As Object
Set WSH = CreateObject("WScript.Shell")
Select Case WSH.Popup(TM_TEXT, TM_DURATION, TM_TITLE, vbOKCancel)
Case vbOK
MsgBox "You clicked OK"
Case vbCancel
MsgBox "You clicked Cancel"
Case -1
MsgBox "Timed out"
Case Else
End Select
End Sub
'---------------------------------------------------------------
Thank you for your help,

MSweetG222

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Timed message box LaDdIe Excel Discussion (Misc queries) 6 March 28th 07 07:48 PM
Timed Message Box FARAZ QURESHI Excel Discussion (Misc queries) 3 January 26th 07 03:13 PM
TIMED MSGBOX FARAZ QURESHI Excel Discussion (Misc queries) 6 January 3rd 07 08:24 PM
Timed Popup Message westg Excel Programming 3 April 27th 06 11:13 AM
Timed Message Box mercedes[_3_] Excel Programming 2 July 12th 05 01:48 AM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"