Microsoft Office Tutorials and References
In Depth Information
Lesson 2: Getting Started with Macros
Getting Started with Macros
In Lesson 1, you read that VBA is the programming language of Microsoft Excel and that a
macro is a sequence of VBA commands to run a task automatically instead of manually. In
this lesson, you learn how to create a simple macro, what its code looks like, and a few options
for how you can run the macro.
coMposing your firsT MAcro
This lesson leads you through the process of composing a macro to sort and format a range of
data. But even before the first line of programming code is written, you’ll want to set up shop
by giving yourself easy access to the VBA-related tools you’ll be using. The following
housekeeping tips usually need to be done only once, and are worth taking the time to do now, if
you haven’t already done so.
Accessing the VBA Environment
At the time of this writing, Excel is at a unique stage in its ongoing evolution, because three of its
versions are being used with substantial popularity. Version 2003 (also known as version 11) was
the final Excel version having the traditional menu bar interface of File, Edit, View, and so on.
Then came version 2007 (also known as version 12) with Office’s new Ribbon interface, and
most recently, version 2010 (also known as version 14) has taken its place among the
community of Excel users.
As with other tasks you typically do in Excel, the actions you take to create, view, edit, or run
VBA code usually start by clicking the on-screen icon relating to that task. Exactly what those
VBA-related icons look like, and what you need to do to make them easily accessible to you,
will depend on the particular version of Excel you are working with.
Start by making sure that the VBA-related icons you’ll be using most frequently are already
displayed whenever you open Excel.
Search JabSto ::

Custom Search