Picture of How to make a message box in Notepad
Hi there. I'm going to teach you how to make a message box. All you need is Notepad. If you have any comments, feel free to post them. Just start learning and have fun!
Remove these adsRemove these ads by Signing Up

Step 1: Step 1: Typing the text

Picture of Step 1: Typing the text
First, open Notepad and type this:

x=msgbox(box text,buttons,box title)

On the part where it says "box text", type the text you want on the window (with quotation marks). On the "box title", type the title of the message box the same way you typed the text. On "buttons" type a number (without quotation marks):

0: Normal message box
1: OK and Cancel
2: Abort, Retry, Ignore
3: Yes, No, Cancel
4: Yes and No
5: Retry and Cancel
16: Critical message icon
32: Warning query icon
48: Warning message icon
64: Information message icon
4096: Always stay on top of the desktop

Step 2: Step 2: Saving the file

Picture of Step 2: Saving the file
When you're done, save it as a VBS(or VBScript)file. To do this, type ".vbs" at the end of the title and change the "Text Document (*txt)" in the "Save as type" select box to "All Files" .

Example: File name: Fake_Virus.vbs
Save as type: All Files

Step 3: The End

Picture of The End
Congratulations! You've done it. To have fun, why don't you make a message box disguised as a "fake" trojan horse on your friend's computer, create a shorcut, rename it, change the icon, lure your friend to click it, and watch them freak out!
As I said, feel free to post any comments.
1-40 of 48Next »
admin6 years ago
Hey, this is a great instructable and is very informative. Just one thing is missing... pictures! It really helps a lot when trying to follow directions so you should consider taking some photographs. Once you do that and leave me a message when you have so that we can publish your work. Thanks! Thanks for the cool instructable and we hope to publish this soon!
admin7 years ago
Hello, and welcome to the Instructables community! It's great that you've decided to tell the world about something you've made by publishing an Instructable. We just wanted to let you know that your project still needs a little more work if you want it to be well received on Instructables. Projects that don't include certain basic elements tend not to get the attention that they deserve, and so we'd love for you to check out the list below of what makes a successful Instructable. Successful projects on Instructables include: - clearly written details of a finished project with instruction - as many steps as are necessary to explain your project - clear images that you took of your project for most, if not all of your steps - an intro image - proper spelling and grammar - appropriate cautions or safety considerations I'll give you another opportunity to make any final changes to your project before we publish it. Once you're all set to go, please republish your project and send me a quick comment letting me know that you've made some changes. I'll give it a quick final check to make sure you're on the right path, and then remove this note. Thanks for your submission and we hope to see your project published soon!
MikaS54 hours ago

This is so cool, thanks for the instructable.
Could you make one for windows 8.1?

UmairY2 months ago

How can i create a never endind dailog box and it will display when computer start

meowk2 months ago

mines not a virus, its for making people welcome.

TheGenius6 years ago
NICEEE!!! i did it wiz my sis, she tought there was a virus!!!!!!! she started to cry ( btw i knew how to make this cz i am a pc n internet engeneer) if any help needed , add me at :
meowk TheGenius2 months ago

oh if u wana message me, here my email

GarrettM13 months ago


jitske.hibma4 months ago

I, m sorry, did'nt get the point. This is what I saved as what was thought:

x=msgbox(box "mailbox",0,"veldfiets"), saved as .vbs, all type of files, in Documents.

Nothing happens on opening the .vbs file: not able to open etc. etc.

What is the clue here?

whops. never mind. i had wrong

you have to save it as ".bat" that's why it did not work.

JacobH54 months ago

great job, do you think you could show how to do it on windows 8.1?

NickD5 JacobH53 months ago

The same EXACT way.

jitske.hibma4 months ago

I, m sorry, did'nt get the point. This is what I saved as what was thought:

x=msgbox(box "mailbox",0,"veldfiets"), saved as .vbs, all type of files, in Documents.

Nothing happens on opening the .vbs file: not able to open etc. etc.

What is the clue here?

There should be spaces between the quotation marks and the commas and there shouldn't be the word "box" inside the parentheses.

DeundraT3 months ago

works right out the gate on win 7, 8 , 8.1 i have this process automated on certain computer within my company to remind users of daily task


lashpashchat6 months ago


advertiz on lashpash.png
ekatris7 months ago

how do you make it that it responds so if you put button #2 and they click retry how do you make it that it will make a new message or use the same

habibieboy11 months ago

Hi there.... i wanna ask, how could I change the dialog box's icon on the taskbar? So it's more fun if i can do that.

Hi! About a year ago I was looking at this... well it didn't
work when I tried it but I was quickly able
to discern a proper message box from what you had.

Here is what I did, no error message:

x=msgbox (“whatever you want message box to say here” ,0, ”title here”)
> “msgbox.vbs”

sonicmario2 years ago
i have made one but it doesn't work it is in dutch so you may not understand it.
here it is:
x=msgbox ("klik op yes", 4,"wees verstandig")
if x=6 then
msgbox "goed zo", 0,":)"
msgbox "kijk jij bent slim"
want er zijn ook mensen die op nee klikken en die krijgen nog een lang verhaal hierachter aan.", 0,"druk op ok"
elseif x=7 then
msgbox "waarom klik je toch op no?", 0,">|"
msgbox "ik zei dat je op yes moest klikken en toch doe je het niet."
msgbox "ik ga je de vraag nog eens stellen. (het is geen vraag maar toch. jij klikt op no :p)", 0,"klik op ok"
msgbox "klik op yes", 4,"wees verstandig"
if x=6 then
msgbox "goed zo", 0,":)"
msgbox "nee grapje. dat zou te gemakkelijk zijn", 0,"lol"
msg* suc6 ermee
goto 12345
elsif x=7 then
msgbox "serieus doe je het alweer.", 0,"jij zit in de problemen."
msgbox "klik maar op ok dan ben je er vanaf.", 0,"doei"
end if

type it (or just copy it) in your notepad and please fix the problems. but only if you want to
you can mail me @
jcdwalle2 years ago
I can't download. Help?
scano12 years ago
Hello i'm planning to make a .vbs on notepad itembox popup then enter choices a, b, c ,d and the value of letter i inserted is





then when i type "a"on first itembox and hit enter there will be another popup itembox with the same choices example i choose "b"

when i hit enter the total of first and second itembox will be computed and write on registry NoDriveTypeAutoRun dword value

on this registry

Before script run:


After script run:


can you give me code for the .vbs or .vbe or .hta using notepad please[:'(]
Barondando6 years ago
I just finished an application in C#, I used this tutorial for the notepad coding, my app will generate the code for you, all you have to do is type in what you want the header to say, what you want the message to say, and select the style of message box from a drop down list. You can then save it, and it disallows users to save as any filetype other than .vbs
please post application!
I don't know where or how to upload it...
I use

Hope that helped ya ;D
Ok here is the program I made.. It does everything that is included in this tutorial plus Loops and it is very easy to use.

Download Link -
That is awesome! Could you tell me how to do that?
Hey i'm new to all of this and i was wondering if you can put a shutdown timer (like you can with batch files) at the end
jparker293 years ago
I'm going to send this to my friend!!! LOL
ajosué3 years ago
You can just put:

msgbox "text" , number, "title"

and save it with the extension .vbs
neivadan3 years ago
say ahhh what in the world are we suppoesd to save this message box as because it dosent even say in the instrutables but anywhy it's a good thing ye posted how to make thoguh !!)
QwertyuioLP6 years ago
if you want infinite msg boxs you can add

x=msgbox(box text,buttons,box title)


x=msgbox(box text,buttons,box title)

which ever one works for you
isnt it:
'your command'

not to say your way is wrong i was just curious
It's the same.
And if you have more then one button and you want a specific button to loop it do this
x=msgbox("box text,buttons,box title")
do while(answer<>digit 1-10)
x=msgbox("bot text,buttons,box title")
Here's a real example
do while(answer<>6)
That will only loop if you press no. Don't use it if you don't know how end it.(just restart your computer)
millsasbc4 years ago
Hi could you please answer theese questions for me,
1. how do i make something happen when i click one of the buttons
2. how do i make the message box automatticaly open when i log on

thnaks could you please reply to this comment at
no no no this is how to make a msgbox in visual basic
not notepad
Actually the way to make a MsgBox in Visual Studio is:

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
MsgBox("Computer Shutting down in 60 Minutes.")
End Sub
aakarsh19975 years ago
Nice one
1-40 of 48Next »