Your Federal Quarterly Tax Payments are due April 15th Get Help Now >>

Office VBA Macros You Can Use Today by P-IndependentPublish

VIEWS: 108 PAGES: 5

For any Microsoft Office user familiar with Word, Excel, PowerPoint, Access, or Outlook, this book provides tutorials on the tools and tricks that automate these programs for increased productivity. Each lesson includes instructions and a downloadable file on which to test the VBA macros and procedures provided. Tasks covered include how to run several mail merges at once, removing duplicates from data, and saving email attachments.

More Info
									Office VBA Macros You Can Use Today
Author: Juan Pablo Gonzalez
Author: Cindy Meister
Author: Suat Ozgur
Author: Bill Dilworth
Author: Anne Troy
Author: T.J. Brandt
Table of Contents

Introduction to VBA
Excel VBA Examples
Word VBA Examples
Power Point VBA Examples
Outlook VBA Examples
Access VBA Examples
Automating Multiple Components
Description

For any Microsoft Office user familiar with Word, Excel, PowerPoint, Access, or Outlook, this book
provides tutorials on the tools and tricks that automate these programs for increased productivity. Each
lesson includes instructions and a downloadable file on which to test the VBA macros and procedures
provided. Tasks covered include how to run several mail merges at once, removing duplicates from data,
and saving email attachments.
Excerpt

Understanding VBA ProjectThe first item in the Project Explorer (see Figure 4) is called VBAProject
(Book1).
Book1 is simply the name of the Excel workbook being used in the screen
capture. When the workbook is saved, the name changes to the name and file
extension of the workbook. For example, if the workbook were saved as
MyWorkbook.xls, then the Project Explorer window would also change to
display VBAProject(MyWorkbook.xls). If multiple workbooks are open, each
one is listed in the Project Explorer alphabetically, as well as any loaded Addins.
For simplicity, we assume that just one workbook is open at this time.
Word displays the Normal project as open in the VBE if a document is open. It
loads when Word is launched. The file name of the Normal project is
normal.dot and it is Word’s default template; it is always in use when Word is
in use, much like an Add-in.
The first item within the VBAProject is Microsoft Excel Objects. As with
Windows Explorer, any of the items with a plus (+) or a minus (–) can be
expanded or retracted by double-clicking on the name or by single-clicking the
+ or –.Working with ModulesVBA has several places in which to store code, but the vast majority of code
is
stored in Standard modules, regardless of the application. Before a module can
be used, it must first be added to the project.The only limitation to the number of modules an Office file
can have is the
limitation imposed by the amount of the computer’s memory. Each module can
have one or many procedures. Writing a project using modules to group similar
procedures together helps keep your project better organized.
In this book, the word “module” is used to indicate a Standard module, though
the word “Standard” is rarely used to describe it; it’s just called a “module”.
Class modules can also be used in VBA Projects; these are referred to as Class
modules in this text.
In our next graphic, the project is expanded to display the contents. Doubleclick
to hide the contents.
Author Bio
Juan Pablo Gonzalez
Juan Pablo González is a professional VBA developer and a Microsoft MVP in Excel. He lives in 
Carbondale, Illinois.


Cindy Meister
Cindy Meister is a Microsoft MVP in Word.


Suat Ozgur
Suat Ozgur is a Microsoft Office expert.


Bill Dilworth
Bill Dilworth is a Microsoft MVP in PowerPoint.


Anne Troy
Bill Dilworth is a Microsoft MVP in PowerPoint.


T.J. Brandt
Bill Dilworth is a Microsoft MVP in PowerPoint.

								
To top