Picture of How to create a message box?
In this instructable, you will learn how to create a message box with notepad on your computer. Below is an example of a message box.

Step 1: Open up notepad

Picture of Open up notepad
Open up notepad on your computer. Type in the following:

x=msgbox ("yourtexthere" ,0, "yourtitlehere")

Replace 'yourtexthere' with the words you want in your message box and replace 'yourtitlehere' with the title you want on your message box (for example x=msgbox ("Do you want to learn how to make this message box?" ,4, "Instructables").

KiraY6 months ago

been interested here! also, how to insert timer on gui? set gui "on" by 10 minutes and if no answer or reply, set default reply as "no". thanks a lot!

Radobot6 years ago
But I know how to make it more advanced(who can work with visual basic is in advantage):
First put on to the first line first (main) msessage box (that will decide what will happend next)
Then put this:

If x=vb* Then
x=messagebox("Second message box",any,"any")
End if

*Here you can put the name of the button that user was pressed (first letter must by big example: vbNo or vbIgnore...)

Here I create a cool example:

x=msgbox("Delete local disc D?",36,"Disc cleaner")
If x=vbNo Then
x=msgbox("Really no?",36,"Adjusting")
If x=vbNo then
x=msgbox("But you can't stop it.",64,"Status")
End if
End if
x=msgbox("Cleaning is starting.",64,"Disc cleaner")

And how it work's:
On start you have a "main" message saying: Delete local disc D?
On second line computer is checking what you was press and if it was No you see next message with question: Really no?
Then computer is again checking what you was press and if it was No you see message saing: But you can't stop it. and computer is going to last line
If it wasn't No then computer jump on the last line where is next message box saing: Cleaning is starting.
P.S. I think you can use this comment like next step :)
Tritix Radobot1 year ago

Is there a way to make buttons that say custom things? For example, a message box that is yes or no, but says Always and Never.

How do you make it so that if you select yes for example it will do one thing but then if you press no it will do another thing?

Type this:

If x = vbNo Then

*User press No


***User doesn't press No - user press Yes or Ignore or OK or ...
End If

And if you want to react on more buttons (like when user can press Retry or Ignore or Abort) try this:

If x = vbRetry Then
ElseIf x = vbIgnore Then
ElseIf x = vbAbort Then
*Not Retry, not Ignore, not Abort - something else
End if

'sweet I tryed that
firtvid20 (author)  Radobot6 years ago
What do you mean? Can you show me??
Wich part you mean? P.S. Try the example!
jlim84 years ago

x=msgbox("You Have A Virus",0,"Virus")

Theres also another way follow ok

GeekBeam5 years ago
4096 would be funneh
I tried 'x=msgbox ("All of your stuff toys have died due to underfeeding",4096,"Alert!")'. When I opened Internet Explorer, it is still showing it!

Oh, I get the 'system modal', example of it is like in Microsoft Office that you want to exit with unsave document and I tried to click some parts of the screen and it keeps beeping.

and I subscribed you
sweet and check this instructable out http://www.instructables.com/id/how-to-flip-your-text/
Radobot6 years ago
I have a code that can do something n times:

For i=1 to *

*number of times
**thing to do * times
How do you get it to open a program after?
here's the code:

set x=createobject("wscript.shell")
x.run "#"

#Target to your file example: "D:\test.bat" or "C:\test.vbs"
Nasatara6 years ago
is there a way to change the icon to Internet explorer or something like that?? thanks nasatara
There is a another way: right click on internet shortcut select properties and change target to your file
coolman6956 years ago
how do you make it go to things like note pad
scott rox6 years ago
This one is so cool, make a shortcut on the desktop and change the name and picture to the Internet explorer one. Its cool cause the victim thinks the problem is with the internet:

x=msgbox ("Warning, Windows has found a virus. Do you want to remove it?" ,4, "WARNING!")
x=msgbox ("Windows could not remove virus. Searching for another antivirus software." ,0, "WARNING!")
x=msgbox ("Windows has removed the virus. Virus deleted program 'Microsoft Word' before it was removed." ,0, "WARNING!")
codongolev6 years ago
might want to check spelling before creating this. and make sure one of them says "FATAL ERROR. WIPE HARD DRIVE OR RISK DESTROYING COMPUTER."
lol put the 4096 one on it XD
4096 is a system modal; all applications are suspended until the user responds to the message box (in other words, this message box stays on top of all applications)
so, like, they can't just x out.

and it does the little *bum* noise and flashes when you try to go to another window.
Padlock6 years ago
This is all great and stuff, but there is no instructions on how to interface it. Is it really useful if "Do you want to open notepad?" pops up, but clicking the buttons does nothing?
Decepticon6 years ago
Actually, this is useful for some real batches I wrote. Not just for idiotic 'pranking'.
dung0beetle6 years ago
Awesome! I make these all the time. They are great for pranking.