ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   how to add message box after a macro is completed (https://www.excelbanter.com/excel-programming/287316-how-add-message-box-after-macro-completed.html)

wendy

how to add message box after a macro is completed
 
help please. I have macro that i will like user to know
when the process has been completed. I think i will have
to create a form and then creat a message box macro
saying "process is completed". I am new to macro so I
will please like to the know what i will need. Also, i
need this message or prompt to appear infront of any
application that might be opened.
thanks in advance

Colo[_79_]

how to add message box after a macro is completed
 
wendy wrote:
* i need this message or prompt to appear infront of any
application that might be opened. *


Hello wendy,

In this case, I recommend to use "WScript.Shell" as follows. ;)



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

Sub YourProcedule()
Dim WScript As Object
Set WScript = CreateObject("WScript.Shell")

'Your code here

WScript.Popup "Excel Upload Complete", 2, "process is completed", vbSystemModal
Set WScript = Nothing
End Sub

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



---
Message posted from http://www.ExcelForum.com/


wendy

how to add message box after a macro is completed
 
thanks colo. I added it but i am getting an erorr.
This is how my code looks like with your codes:
Sub teacher()
Dim WScript As Object
Set WScript = CreateObject("WScript.Shell")

'the rest of my codes with ends with
application.visible=false
WScript.Popup "Excel Upload Complete", 2, "process is
completed", vbSystemModal
Set WScript = Nothing
End Sub

then
-----Original Message-----
help please. I have macro that i will like user to know
when the process has been completed. I think i will have
to create a form and then creat a message box macro
saying "process is completed". I am new to macro so I
will please like to the know what i will need. Also, i
need this message or prompt to appear infront of any
application that might be opened.
thanks in advance
.


Colo[_81_]

how to add message box after a macro is completed
 
wendy, please kindly let me have what kind of error did you get?


---
Message posted from http://www.ExcelForum.com/


wendy

how to add message box after a macro is completed
 
First let me thank you for been so helpfull. everything
works well as it wast, expect at the end it gives me this
error:
"Run-time error '424'. object required
This only happens when i add your code.
-----Original Message-----
wendy, please kindly let me have what kind of error did

you get?


---
Message posted from http://www.ExcelForum.com/

.


Tom Ogilvy

how to add message box after a macro is completed
 
The code you posted runs fine for me in xl2000, windows 2000

Is the constant vbSystemModal defined?

msgbox vbSystemModal

does the code you posted work (just that code, not combined with your
original)?

--
Regards,
Tom Ogilvy

"wendy" wrote in message
...
First let me thank you for been so helpfull. everything
works well as it wast, expect at the end it gives me this
error:
"Run-time error '424'. object required
This only happens when i add your code.
-----Original Message-----
wendy, please kindly let me have what kind of error did

you get?


---
Message posted from http://www.ExcelForum.com/

.





All times are GMT +1. The time now is 09:19 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com