View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
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.