![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Join Date: Mar 2002
Posts: 32
|
Trying to be funny and want my little macro to pause for like 5 to 10 seconds with the message Processing.... in a msgbox and then to disappear after the timer is up without pressing a key, is that possible?
Thanks |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Bogota, Colombia
Posts: 11,738
|
Yes, possible... and asked quite a few times as well...
The options are from the very simple of having a textbox from the drawing toolbar displayed in the sheet, and hide it with the macro to the complicated ones (Coded by Ivan F Moala) that uses some API calls to dismiss the MsgBox automatically. Just a matter of how 'fancy' you want to go... |
|
|
|
|
|
#3 |
|
Join Date: Feb 2002
Location: USA
Posts: 1,261
|
I got this off the board and it works well for me with the workbook_open event:
Code:
CreateObject("WScript.Shell").Popup "Place message here", 3, "Message Title"
hth kevin |
|
|
|
|
|
#4 |
|
Join Date: Mar 2002
Posts: 32
|
Basically, what I have written right now is something I threw together in 15 minutes... they open up a spreadsheet, there is a button that says Push Me for Quote or Purchase Order Number....
they push it 1) it asks for Company Name(for quote or po) 2) then their name 3) Quote or PO? This is all done with InputBox presently. Then displays the next number available for quote/po... I just want it to pause for 5 or 10 seconds.... in a box that says... Processing..... then the box can either change it wording and display the number to use or just disappear and open the next msgbox in the macro... any ideas where to get that type of code or understanding of which to use? |
|
|
|
|
|
#5 |
|
MrExcel MVP
Moderator Join Date: May 2003
Location: Boulder Creek, CA
Posts: 18,775
|
You can build a User Form that displays your "Processing..." dialogue in the caption, in the code put:
Private Sub UserForm_Initialize() lblMessage.Caption = Processing_Message End Sub Private Sub UserForm_Activate() Me.Repaint Application.Run Macro_to_Process Unload Me End Sub Then Insert a module and put: Public Processing_Message As String Public Macro_to_Process As String Sub StartProcessing(msg As String, code As String) Processing_Message = msg Macro_to_Process = code Processing_Dialog.Show End Sub Sub MyMacro() For x = 1 To 50000 Application.StatusBar = x Next Application.StatusBar = False End Sub Sub Main() StartProcessing "I'm Working On It! Just Hang On!", "Update_Now" End Sub I got that one from Microsoft a few years ago when they still gave out help... |
|
|
|
|
|
#6 | |
|
Join Date: Mar 2007
Location: Chicago Area
Posts: 1,333
|
Hi,
I am trying to make this work and wondering why it doesn't go away after a few seconds. Code:
Sub test()
CreateObject("WScript.Shell").Popup "Place message here", 3, "Message Title"
End Sub
Thanks! Tai Quote:
|
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|