Wiley Microsoft Office Excel 2007 Programming: Your visual blueprint for creating interactive spreadsheets 978-0-470-13230-2 User Manual

Product codes
978-0-470-13230-2
Page of 24
Introducing 
Excel Programming
A
s you probably know, Microsoft Excel is an
electronic worksheet you can use for a variety of
purposes, including the following: maintain lists;
perform mathematical, financial, and statistical
calculations; create charts; and analyze your data with a
PivotTable. Excel can also help you locate data, find
trends in your data, and present your data to others.
This book is about automating the tasks you perform in
Excel by using Visual Basic for Applications (VBA). You
can use VBA to automate those repetitive tasks you
perform frequently. For example, if the layout of your
monthly report rarely changes, you can use VBA to set
up your report each month.
VBA is a programming language; however, you do not
have to be a programmer to automate the tasks you
perform in Excel. You can also automate a task by using
the macro recorder to create a macro. A macro is a
recording of the steps you want to automate. You just click
a button to turn on the macro recorder and begin
performing the steps as you normally would. Excel records
each step and creates the VBA code. When you finish, you
click the Stop Record button. When you select your macro
in the Macro dialog box and click the Run button, Excel
plays back the steps you recorded. For example, if you
record the steps necessary to create your monthly report,
all you have to do each month thereafter is click a button
and Excel automatically sets up your report.
With VBA, you can do more that just create macros. You
can use VBA to edit macros, create new functions, create
custom applications, and create add-ins. For these tasks,
you must learn the VBA programming language. This
book teaches VBA. It is based on Office 2007; code you
write for Office 2007 may not be compatible with earlier
versions of Excel.
1
Click the Developer tab.
Note:
See the section, “Introducing Macros,” to learn how to
display the Developer tab.
Use the options in the Code group to automate your tasks.
2
Click either of these Record Macro buttons to record a
macro.
Note:
See the section, “Record a Macro,” for more details.
3
Click Macros to run a macro.
Note:
See the section, “Run a Macro,” for more details.
1
3
2
2
4
Introducing Excel Programming
2
Use the options in the Controls group to add check boxes,
fields, and other form controls to your worksheet.
Use the options in the XML group to work with XML.
4
Click here or press Alt+F11.
Excel moves to the Visual Basic for Applications Editor (VBE).
04_132302 ch01.qxp  7/27/07  9:19 PM  Page 2
COPYRIGHTED MATERIAL