Run VB Script code written on notepad without any additional software-Windows

vb

There is very easy way that you can run VB Script code written on notepad without any additional software installed in your PC. Every Windows machine comes with default software that allows you to run VB script code written on notepad.

The good thing is, no need to write your VB code directly to any tool that you use to develop any application. You can write and run VB script code on notepad and verify your code is working fine or not. Once verified you can directly copy and paste the same code to your application.

Write and run VB Script code on notepad is very simple. Here are few steps that you can follow, how to run VB Script code written on notepad.

1) Open notepad.

2) Write any VB Script code.

For example:

Write this script on notepad-

i=10

If i=10 Then

msgbox(“This is my first script, Click OK to close”)

Else

msgbox(“Hello world”)

End if

vb1

3) Save notepad as Test.vbs on desktop. Once you will save notepad with script with the file extension .vbs the notepad will look like this-

vb2

4) Now double click on the file. Once you double click on the Test.vbs file, the script will run automatically and will show the result shown below.

vb3

That’s it, you can edit or add the new script according to your choice by right clicking on Test.vbs file saved on desktop.

Now you are able to run VB Script code written on notepad without any additional software.

17 Responses to “Run VB Script code written on notepad without any additional software-Windows”

  1. G says:

    Works just fine. Clean up the reverse and forward quotes and get rid of spaces between lines.

  2. Mikky says:

    It’s not working for me in windows 7

  3. Kislay Raj says:

    This is not working on my laptop. I am using windows 8.1pro.

  4. cheap ster says:

    i have done all same. but when i open it it says source not found. what should i do

  5. suresh says:

    what are the online vbscripts executors available ??
    can you plz list few of them

  6. ranjitha says:

    Does not support in Window7

  7. Orhan says:

    if you have made copy-paste, try to delete the ” ” characters on line 5 and 9 and type them again.
    then works.

    • Barry says:

      This resulted in errors until I noticed that the cop-and-pasted double quotes are open and close quote symbols and not the “plain” doubles quotes that you get typing directly in Notepad, as Orhan notes.

  8. Vinayak says:

    Is it possible to create a Userform in notepad.

    If yes, how can we do that

  9. ravi says:

    it is not running in windows 8.1 it not show the saved vbs file what can i do

  10. Jalal says:

    not working in Windows 7

  11. Ravi Vishwakarma says:

    How to create game in Notepad By visual basic programming

  12. cool notepad tricks says:

    Generally I do not learn post on blogs, however I would like
    to say that this write-up very compelled me to try and do so!

    Your writing taste has been amazed me. Thanks, quite great article.

Leave a Reply

Your email address will not be published. Required fields are marked *