Tuesday, April 30, 2013

How to Compile and Run Visual Basic Program in Command Prompt of Windows 7 without any software

Without installing any software, we can compile and run Visual Basic (VB) program in Command Prompt of Windows 7. Step by step procedure is given below:

1. Type "Advance system settings" in windows start menu.

2. Click on "View advanced system settings"

3. System properties window will open.

4. Click on "Enviromment Variables".

5. In the "System Variables" box (lower side), first select "Path" and then click "Edit" button.

6. At the end of the "Variable value", first put a semicolon ";" (with out invited comma) and then paste the following line:


7. Click "Ok".

8. Now open notepad and write your first VB program.

Imports System
Module HelloVB
      Sub main()
             Console.Writeline("Hello World !")
             Console.Write("Press any key to exit.")
      End Sub
End Module

9. Create a folder named "test" on desktop and then save the file as HelloVB.vb inside this folder.

10. Now go to desktop and Shift+RIght Click on the "test" folder.

11. Click on "Open command window here".

12. Command window will open inside this folder.

13. Type

vbc HelloVB.vb

and press enter.

14. Next type


and press enter and you can see the output as

Hello World !

Written by
If you like this post, you can follow MyCoolFundas on Twitter, Like MyCoolFundas on Facebook or subscribe our Youtube Channel for instant updates. Email: snpmath@gmail.com

No comments:

Post a Comment