|
learn
visual basic -- 2, the IDE
the
IDE, or the user-interface of VB and VBA are almost the same.
perharps the only difference is that VB is more functional.
if you have VB, then use the VB IDE in this "learn visual
basic" series. if not, VBA environment will do. but one
thing please...don't resort to buying pirated VBs...if you
want quality stuffs, please don't discourage the people at
Microsoft.
anyway...continue.
a visual basic program consist of a userform (in VB it's just
-- form). if you followed chapter one, you would know how
to open the VBA editor. take a look at the toolbar(may differ
if you changed t). some important buttons are:
run
sub/userform -- a blue triangular button
stop (running) -- blue square
pause -- the blue "11"
add form/modules/class module/procedure -- a button beside
the save button(i am sure you know that save button)
there
are also some important windows. select and open them from
the view menu:
properties
window
project explorer
toolbox
code window
so
i'll explain one by one of their uses.
the
run button
after typing all of you codes, you want to test if there are
errors or if the program is ready for compile, you click on
this button to run the codes, or procedures you written. i'll
talk about procedures and codes later.
the
stop button
the stop button is to stop running the procedures. quite obvious.
the
pause button
it is also called the break button. it is used to pause the
running, and break up the codes so that you can examine the
variables and so on. i'll explain variables later. the pause
button will bring you back to the code window.
add
form/module/class module/procedure
i felt abit irritated, typing such a long name...well...it
is for adding a new form/modules... etc. (not again!) to your
existing project. so that your program's funtionality is increased.
i'll talk more of it later.
properties
window
shows the properties of the elements or objects or tools (whatever
you call it). you can change them here or you change them
when the program is running. anyway, that is the main thing
in VB changing of properties.
toolbox
as it's name suggest, it contains many useful controls for
use in a form. they include command buttons, labels, text
boxes, image boxes, etc. they are the little things which
make up your programs.
code
window
this is where you type your codes. examine and debug. you
may not see it anywhere. but if you double click on any form
or control, the code window will pop up and you'll see something
like private sub ... end sub.
i'll talk more about subs later.
there
are many other things in the IDE or the editor which i will
not go through now. i will explain them next time if i need
to or even not at all. you should discover on your own or
check the help often. i will speak more of english in my articles,
rather than computer jargons which would probably make you
blur.
continue
next chapter
|