If your calculator passed the testing
in the previous step, it is time to make the final .exe file, which
turns the Visual Basic Project into a stand-alone Windows program.
With your calculator project open in
Visual Basic, click on the "Project" menu and then "Publish Option Calculator".
A screen will open that says "Where do you want to publish the
You want to accept the default answers
from all the remaining screens, so you can just click the "Finish"
button at any time.
When Visual Basic "Publishes" a program,
it makes an .exe file and a bunch of other files to enable "installing"
it on your computer or anyone else's computer.
"Installing" a program means it will
show up on your Windows Start menu, and it can be "Uninstalled" later
by using Windows Control Panel to remove it from your computer.
"Installing" is not necessary and we
do not recommend it. If you write your own programs or want to modify
programs, it just adds unnecessary steps to the process. You will find
yourself "installing" and "uninstalling" your programs
over and over.
You can use the .exe file just as it
is, by double-clicking it from the directory it is in, or by dragging
the .exe file from within Windows Explorer to your taskbar and "pinning"
it there, or by dragging it to your desktop. If you ever need to get
rid of the .exe you can just delete it.
The only difference as far as using
the .exe file directly will be that it will not show up on your Windows
If you installed Visual Basic to the
default directory, the location of the .exe file should be:
Studio 2017\Projects\Option Calculator\Option Calculator\bin\Debug\Option
*** There will be another .exe in the same directory named "Option
Calculator.vshost.exe". You do not want that one.
The easiest thing to do is find the
Option Calculator.exe in Windows Explorer, drag it to your taskbar,
and "pin" it there (assuming you are using Windows 7). Then you can
run it with a single click. If you ever don't want it, right click on
the icon on the taskbar, and select "Unpin this program from taskbar".
Congratulations on your completed project!
Be sure and read the next section for several different useful ways
to use the calculator.
And if you enjoyed building the Option
Calculator, be sure and check out the Basic Option Graph project, where
we will add three more option legs plus a stock leg, and allow pricing
and graphing entire positions such as bull calls, iron condors, covered
calls, collars, and so on.