Introduction To VBA in Excel Week 1: Study Items For This Week
Introduction To VBA in Excel Week 1: Study Items For This Week
1.
Introduction
to
VBA
–
What
is
it
and
why
do
we
need
it?
1.1
What
is
VBA?
• VBA
stands
for
Visual
Basic
for
Applications.
• Applications
in
the
word
VBA
refers
to
the
different
Microsoft
programs
such
as
Excel,
Word,
PowerPoint.
We
will
focus
on
Excel.
• VBA
is
a
tool
for
programming,
editing
and
running
application
code
of
the
host
application
(excel).
We
will
run
its
code
within
the
host
application.
• We
can
work
on
VBA
using
the
VBA
editor
that
we
can
open
from
the
‘Developer’
tab
in
excel
by
clicking
on
first
item
in
the
ribbon
called
‘VBA’
or
can
press
Alt+F11.
2.
Getting
started
with
VBA
–
Access
the
VBA
editor
1. Open
Excel
2. Enable
Developer
tab:
File
à
Options
à
Customize
Ribbons
à
Developer
The
Developer
tab
will
now
be
appearing
in
you
excel.
Click
on
‘Visual
Basic’
option
in
the
ribbon
to
open
up
the
VBA
editor.
The
VBA
editor
will
look
similar
to
the
screen
shot
below.
This
has
multiple
windows
within
it
as
shown
below.
This
is
just
to
show
you
what
it
looks
like
for
now.
We
will
get
back
to
it
later.
You
can
read
details
about
the
different
parts
at
this
link:
https://www.thespreadsheetguru.com/vba-‐
intro/the-‐visual-‐basic-‐editor
3.
Record
a
Macro
The
first
thing
you
will
do
is
to
use
the
Macro
recording
option
without
having
to
write
any
code.
Macro
–
is
a
piece
of
code
that
you
can
either
write
yourself
in
VBA
editor
or
in
some
cases
can
be
create
using
the
Record
Macro
option
in
the
Developer
ribbon.
See
the
video
on
this
link
:
https://www.youtube.com/watch?v=v4Uo5gMSqAg.
Don’t
worry
about
the
coding
part
just
yet.
Here
you
are
practicing
it
without
writing
the
code,
where
VBA
will
automatically
create
it
and
you
can
see
the
code
for
it
in
the
editor.
Also
check
this
link:
https://www.excel-‐pratique.com/en/vba/first_macro
Another
video
you
can
view:
https://www.youtube.com/watch?v=ltcpaHdXUrU&list=PLWPirh4EWFpEFSYTbKaST6hSlgIFCJjU
3&index=5
Important
when
saving
excel
file
with
Macros
in
them.
Else
you
will
lose
your
macro
info:
https://www.youtube.com/watch?v=IuzssYXKgzY&list=PLWPirh4EWFpEFSYTbKaST6hSlgIFCJjU3
&index=6
6.
Recap
An
ebook
by
Mike
McGrath
with
a
title
‘Excel
VBA
in
easy
steps’
(2nd
Edition)
has
been
uploaded
on
LMS
along
with
‘Week
1
Guide’.
To
recap
the
topic
‘recording
a
Macro’
please
read
the
first
two
topics
of
the
book.
These
two
topics
are:
1. Introducing
Excel
VBA
2. Recording
a
macro
If
you
need
further
practice,
you
can
follow
the
video
on
the
following
link:
https://www.youtube.com/watch?v=G05TrN7nt6k
This
is
a
great
video
and
the
person
explains
things
well
but
its
about
2hours
long.
However,
for
now
you
can
watch
the
initial
28
minutes
of
it.
That
initial
part
is
where
she
introduces
you
to
VBA
and
also
how
record
a
macro.
In
the
later
part
she
also
talks
about
write
Macros
but
you
can
come
view
that
at
a
later
time.