Windows 10 Coming Soon
Tips & Tricks
Windows Forum
Course Index
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Home > Courses > Visual Basic > VB 6 > 101 > Lesson 07 < Lesson 06 | Lesson 08 >
Compiling

Lesson 7: Compile VB to EXE & Find EXEs


 S  M  L  XL  FS  |  Slo  Reg  Fast  2x  |  Bookmark 

In this lesson, we will walk through how to compile your Visual Basic program into a standalone executable file so you can run it directly from Windows without needing the Visual Basic editor. I will show you how to save your project, generate the .EXE file, locate it in your file system, and create a desktop shortcut. We will also discuss file extensions, explain how to identify your executable, and touch on what you need to know if you want to share your compiled program with others, including a brief mention of the Package and Deployment Wizard for distributing your Visual Basic program.

Navigation

Keywords

, compile Visual Basic program, create exe Visual Basic, standalone executable Visual Basic, Visual Basic Save Project, MakeSimpleCalculator.exe, file extensions Windows, Visual Basic deployment, Package and Deployment Wizard, .exe .frm .vbp files

 

Start a NEW Conversation
 
Only students may post on this page. Click here for more information on how you can set up an account. If you are a student, please Log On first. Non-students may only post in the Visitor Forum.
 
Subscribe
Subscribe to Compiling
Get notifications when this page is updated
 
Intro In this lesson, we will walk through how to compile your Visual Basic program into a standalone executable file so you can run it directly from Windows without needing the Visual Basic editor. I will show you how to save your project, generate the .EXE file, locate it in your file system, and create a desktop shortcut. We will also discuss file extensions, explain how to identify your executable, and touch on what you need to know if you want to share your compiled program with others, including a brief mention of the Package and Deployment Wizard for distributing your Visual Basic program.
Transcript In this lesson, we are going to see how to compile our Visual Basic program into a standalone executable file.

All right, here we are back in our simple calculator we were working on. Now, if I want to run this calculator program, I have to come here inside the Visual Basic editor and then run the program. But that is not very useful in my day-to-day life. I do not want to have to stop and run Visual Basic just to run this program.

So it would be nice if I had some way of compiling this program up into an executable file. In other words, a program file that I can run just from inside of Windows. And we can do that.

First, make sure you save your project. Hit the Save button. It will save any files that you have not saved since you made changes. Now, click on File and then come down to MakeSimpleCalculator.exe. This will compile your program up into an executable program. It will ask you for a name. Simple Calculator sign. Hit OK. You will hear Windows do some turning and bubbling. When it is all done, you will have an executable program.

But where is it? I do not see it. Well, let us go look for it. Let us minimize our Visual Basic editor for the moment. And let us go to Start and up to My Documents.

There it is. Here is my My Documents folder. And here is my VB files folder. Let us open that up. Double-click. And here is a whole bunch of stuff in here. Let us see what we have got.

Oh, here we go. Here is our SimpleCalculator. That is the program. Here is a SimpleCalculator Visual Basic Form file. And the SimpleCalculator Visual Basic Project file. How do you tell the difference between these guys?

Well, in my Windows courses, I teach people how to turn on what are called file extensions so you can see the three or four character extensions at the end of these file names. If you are going to be doing any programming, it is also a must. Click on Tools and then Folder Options. Go to the View tab. Then come down here and uncheck Hide Extensions for Known File Types. I wish the guys at Microsoft would leave that off by default. Click on OK. Now you can actually see what these are.

This is an .EXE, an executable, an .FRM, a form, and a .VBP, a Visual Basic Project. The other descriptions are here too, but you cannot always tell what these are. With the extensions showing, you can see exactly what these are. And seeing file extensions, by the way, will help you to avoid viruses. You will know not to click on an .EXE file.

But here is what I am trying to show with the lesson. Let us find the .EXE file and double-click on it. And there we go. Our program runs right from my computer or Explorer or wherever you happen to be in Windows. It is now its own standalone Windows application. You do not have to load up Visual Basic to run your program.

And just like I show in my Windows basics courses, you can take this, right-click on it, and drag it to the desktop, and create a shortcut to it. So now your simple calculator is on your desktop. You can click on it once to rename it. Check the Latour. And there we go.

Now anytime I want to run this, I can just double-click on it right here on my desktop.

Now, one of the things that students always ask me in my classroom class is: Can you share your program? Can I take that .EXE file that we just created and give it to a buddy on a floppy disk and say, here, you can run this?

The answer is, it depends. If he has any other Visual Basic programs on his machine, chances are he has all the necessary files. You may have to give him some additional files, some DLLs, and some other control files that he might not have on his computer. Again, depending on what is on his machine right now.

If you look on your Start Menu, Start Programs, Visual Studio, and then any Microsoft Visual Studio tools, you will find a Package and Deployment Wizard. Now, we are not going to run through this wizard in today's course. We are going to do this in a future course. But this guy basically takes your program and packages it up with all the necessary files that you need to distribute your program.

Feel free to run through this Package and Deployment Wizard if you would like to. You will need to bother if you want to be able to share your Visual Basic program with other people. You can try giving them your .EXE file first and see if it works. But if not, you might have to run through this. Again, we are going to cover this in a future course.

But since my students always ask me about this, even in the basics classes, I feel it is necessary to tell you. But keep in mind that since you have Visual Basic on your computer, you do not need to do that. You can run just the .EXE because you have all the necessary files on your machine.
Quiz Q1. What is the main purpose of compiling a Visual Basic program into an executable file?
A. To run the program without needing the Visual Basic editor
B. To make the program run faster in the editor
C. To edit the source code directly in Windows Explorer
D. To increase the security of your code

Q2. What should you do before compiling your Visual Basic program?
A. Close all windows
B. Save your project
C. Uninstall Visual Basic
D. Delete temporary files

Q3. How do you start the process of creating an executable file in the Visual Basic editor?
A. Click Run
B. Click File and then MakeSimpleCalculator.exe
C. Click Debug and select Compile
D. Click Tools and select Build Solution

Q4. In which folder is the compiled executable file typically located after compilation?
A. The desktop
B. The Windows system folder
C. The VB files folder in My Documents
D. The downloads folder

Q5. What must you do to see the file extensions in Windows?
A. Check Show Hidden Files in Tools
B. Rename the files manually
C. Uncheck "Hide Extensions for Known File Types" in Folder Options
D. Use a third-party file manager

Q6. Which file extension indicates that a file is a standalone Windows application?
A. .FRM
B. .VBP
C. .EXE
D. .DOC

Q7. What can you do with your executable file for easier access on your desktop?
A. Drag its shortcut to the desktop
B. Convert it to a PDF
C. Rename it to .TXT
D. Send it by email only

Q8. Can you always share your .EXE file with others and expect it to run on their computers?
A. Yes, it will always work
B. No, it never works
C. It depends on whether their computer has the necessary files and libraries
D. Only if they have the same version of Windows

Q9. What tool can help package your Visual Basic program with all necessary external files for distribution?
A. Windows Task Manager
B. Control Panel
C. Package and Deployment Wizard
D. System Restore

Q10. Why is seeing file extensions useful beyond just programming?
A. It makes files bigger
B. It helps avoid viruses by identifying executable files
C. It changes file icons automatically
D. It enables internet connectivity

Answers: 1-A; 2-B; 3-B; 4-C; 5-C; 6-C; 7-A; 8-C; 9-C; 10-B

DISCLAIMER: Quiz questions are AI generated. If you find any that are wrong, don't make sense, or aren't related to the video topic at hand, then please post a comment and let me know. Thanks.
Summary Today's video from Windows Learning Zone focuses on how to compile your Visual Basic program into a standalone executable file. Many times, when you are developing a program, like the simple calculator we have been working on, running it within the Visual Basic editor is just not practical for everyday use. Having to open up the editor every time to run your project is quite inconvenient. What is much more useful is turning your work into an executable file that you can launch directly from Windows, just like any other program.

The first step I always recommend is to save your project before you start compiling. Use the Save command to make sure all your current changes and files are properly stored. Once everything is saved, open the File menu and look for the "Make" option, which should list your project's name followed by .exe. Selecting this option tells Visual Basic to compile your entire project into an executable program. You will be prompted to choose a name for your new .exe file. Enter a name you will remember, such as "Simple Calculator," and confirm your decision. After a short pause, the compilation will finish, and you will have a brand new executable version of your program.

Now, you might wonder where this file ends up. Typically, Visual Basic deposits the new .exe file in the same location as your project files, which is often inside your My Documents folder. Within that directory, look for your Visual Basic files folder. Open it up, and you should see several files associated with your project. These will include the .exe file you just created, as well as other files such as .frm (your form file) and .vbp (the project file itself).

If you are not familiar with file extensions, it can help a lot to turn on the option to display them in Windows. This allows you to quickly distinguish between different types of files by the three or four letters at the end of their names. To do this, open Folder Options under the Tools menu, go to the View tab, and uncheck the option labeled "Hide extensions for known file types." Knowing the file extensions helps not only with programming but also with general computer safety. It is much easier to identify which files are executables, forms, or project files once you can see the extensions.

At this point you can double-click on your .exe file just like any other Windows application, and your calculator program will start up. You do not need Visual Basic running in the background to launch it now. If you want easier access, you can right-click the executable and drag it to your desktop to create a shortcut. After renaming it to whatever you prefer, your program will be ready to run anytime from your desktop.

One of the most common questions I hear from students is whether you can share your program with someone else. The answer is: it depends. If the person you want to share it with has other Visual Basic programs installed on their computer, there is a good chance everything needed to run your program is already there. However, if not, you may need to provide additional files, such as DLLs or other controls, that your program relies on.

To help with distributing your program to others, Visual Studio comes with a tool called the Package and Deployment Wizard. You can find it in your Start menu under Visual Studio tools. This wizard essentially bundles your program with all the necessary support files, making it easier to share your work with others who do not already have Visual Basic or the required components installed. If you are just sharing with yourself or running your program on your own computer, you do not need this, since your system will already be set up with everything required.

That covers the basics of compiling your Visual Basic program and running it as an independent Windows application. If you want to learn more about packaging your projects for distribution, I will be covering the Package and Deployment Wizard in a future lesson.

You can find a complete video tutorial with step-by-step instructions on everything discussed here on my website at the link below. Live long and prosper, my friends.
Topic List Saving your Visual Basic project before compiling
Compiling a Visual Basic project into an EXE file
Naming your executable during compilation
Locating the compiled EXE file in Windows
Viewing file extensions in Windows Explorer
Identifying different Visual Basic project files by extension
Running your EXE file as a standalone Windows program
Creating a desktop shortcut to your compiled program
Article If you have been working on a project in Visual Basic, such as a simple calculator, you may have noticed that running your program usually requires opening the Visual Basic editor and running it from there. This can be inconvenient if you want to use your program regularly or share it with others who do not use Visual Basic. Fortunately, Visual Basic allows you to compile your project into an executable file, also known as an .EXE file, so you can run your application directly from Windows, just like any other program.

To compile your Visual Basic program, start by making sure your project is saved. Click the Save button to ensure that all your recent changes are not lost. Once everything is saved, click on the File menu, then look for an option that says something like "MakeProjectName.exe" where "ProjectName" is the name of your Visual Basic project. Selecting this option will begin the process to compile your program into an executable file. You will be prompted to choose a name for the executable. Give it a descriptive name, such as SimpleCalculator, and then click OK. Visual Basic will process the compilation, which may take a moment.

Once the process is complete, you might be wondering where your new .EXE file ended up. By default, Visual Basic saves the executable in your project's folder, which is typically found inside your Documents folder in a directory like "VB files" or similar. To find it, minimize Visual Basic and open Windows Explorer. Navigate to your Documents and then to the folder where you save your Visual Basic projects. You will see several files in this directory, including your new executable file, the project file, and any form files you used.

It can be tricky to tell which file is which, especially if file extensions are hidden. It is very helpful to enable file extensions in Windows so you can clearly see which files are executables (.EXE), forms (.FRM), or project files (.VBP). To do this, open the Tools menu in Windows Explorer, choose Folder Options, go to the View tab, and uncheck Hide Extensions for Known File Types. Click OK to apply this change. Now, when you look in your project folder, you will see the file extensions and can easily spot your .EXE file.

To run your program, simply double-click the .EXE file. Your application will launch as a standalone Windows program, without needing to open Visual Basic. This makes it much more convenient to use your project whenever you need it. If you want quick access to your program, you can create a shortcut to it. Just right-click on the EXE, drag it to your desktop, and choose to create a shortcut. You can then rename this shortcut as needed, for example to Simple Calculator, making it easy to find and use any time.

A common question is whether you can share your new program with others. In many cases, you can simply give someone your .EXE file and they will be able to run it on their computer. However, this depends on whether their computer has the necessary support files that Visual Basic programs may require. Often, if they have run other Visual Basic programs before, these supporting files are already present. If not, your program might not run correctly out of the box.

To solve this issue, Visual Basic includes a Package and Deployment Wizard, which helps you bundle your program together with any extra files it needs. You can find this wizard in the Visual Studio tools under your Start Menu. This tool guides you through the process of creating a setup package, making sure that when others install your program, all required files are included. If you do not want to use the wizard right away, you can always try giving someone your .EXE file first and see if it works for them. If they have trouble running it, use the packaging tool to create a complete installer for them.

It is worth mentioning that if you have Visual Basic installed on your own computer, you already have all the support files necessary to run your compiled programs. That is why your .EXE file works right away on your own machine. If you plan to share your program with people who might not have Visual Basic, remember to consider the steps above to ensure they can use your program easily.

In summary, compiling your Visual Basic project into an executable file allows you to use your programs like any standard Windows application, without requiring Visual Basic to be open. Remember to enable file extensions in Windows so you can easily manage your files, and take advantage of the Package and Deployment Wizard when you want to share your project with others and make sure it works on their computers. This process is essential for turning your personal projects into convenient, shareable applications.
 
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 6/30/2026 8:53:55 AM. PLT: 1s
Keywords: , compile Visual Basic program, create exe Visual Basic, standalone executable Visual Basic, Visual Basic Save Project, MakeSimpleCalculator.exe, file extensions Windows, Visual Basic deployment, Package and Deployment Wizard, .exe .frm .vbp files  PermaLink  How To Compile Visual Basic Programs Into EXE Files and Find Executables in Windows