Sunday, March 22, 2009

Self Closing Message Box

Hi All,
As we all know that manual intervention is mandatory when we are using message boxes.
Until & unless we click "OK" messagebox will not closed.

Here i am providing a function through which mesage box closes automatically (without manual intervention)

' Function Defination
Function Selfclose_msgbox(msgboxtitle,boxcontent)
Dim x,y
Set x=CreateObject("WScript.Shell")
Set x=Nothing
Set y=Nothing
End Function

' Function Declaration/Calling :
Call Selfclose_msgbox("country Name","which country you are from")

Output will be :

This message box will be closed in 2 seconds automatically.

No comments:

Post a Comment