Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Message box display or something in the status area after macro button is pressed?

If you want a timed MsgBox

Dim cTime As Long
Dim WSH As Object

Set WSH = CreateObject("WScript.Shell")
cTime = 30 ' 30 secs
Select Case WSH.Popup("Don't do it!", cTime, "Hint", vbOKCancel)
Case vbOK
MsgBox "You clicked OK"
Case vbCancel
MsgBox "You clicked Cancel"
Case -1
MsgBox "Timed out"
Case Else
End Select


As you can see, it can be OK, Cancel or timed out.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"StargateFan" wrote in message
...
Is there as message box type of thing in Excel? i.e., if user has
clicked a button which has a macro assigned to it, is there a message
box that we can have open for x number of seconds or milliseconds that
tells the user what the macro is doing or what it has done? I'm
guessing maybe even a message in the status area at bottom of the
worksheet would be good (?).

i.e., so that when they click on first button it'll say ... "Sorted by
Contact Name", when 2nd button is pressed, it'll then say: "Sorted by
Company Name", etc.?

Thank you.



Reply
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
create a button when pressed it will +1 to another field mswisher Excel Discussion (Misc queries) 2 November 24th 09 04:34 PM
preventing button being pressed Mike Excel Discussion (Misc queries) 2 March 16th 06 03:47 PM
count how many times a button is pressed Mike Excel Discussion (Misc queries) 2 February 5th 06 09:38 PM
Which button was pressed? Adrian[_4_] Excel Programming 7 April 28th 04 04:55 PM
Errormessage when button is pressed twice or more Pointerman Excel Programming 4 April 7th 04 03:56 PM


All times are GMT +1. The time now is 10:14 PM.

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"