A primer in Macros...

What is a macro?
Macros are basically programs, written in Visual Basic, the live and work
within the frame of Microsoft Office programs.  They are valuable tools
that can aid in a multitude of projects.  I use them mainly for repetitive
tasks, data formatting, and simple calculations.  One drawback to
macros is that they are SLOWWWWW.  This means it isn't a good
idea to write a macro that does a lot of complex math, or reiterations.

Why do I get warnings when opening files containing macros?
Visual Basic macros come with major security issues.  Unlike some
other languages, Visual Basic can make changes to your hard drive.
Therefore, they can be easy roots for hackers or viruses.  I would
definitely recommend a good virus detection software, and some
deep reassurance from the macro provider, before opening it!

Now that I have a macro, how do I go about using it?
There are many different ways of starting macros.  One popular
method is only available with older versions of VB.  This made
it possible to make an item appear on the menu bar that would
start the macro.  Another method is to place a command button
on the file to be used that starts the macro.  The most basic
method is through the menu bar, by selecting Tools, then
Macros, and selecting the macro you want to run.  For macros
I use regularly, I create a "macro library".  This is a directory
on my computer where I store files containing macros.  Then,
in the application (Word, Excel, etc.) that uses the macro,
I create a new Tool Bar item that runs the macro.  This way,
when I need a macro, I just click a button on the Tool Bar, the
file containing the macro is opened, and it runs.

There are tons of web resources about Visual Basic macros.
If you have a resource you like, e-mail me, and I will put in
a link here.  If you would like to learn how to write your
own macros, just download one and take it a part...that's'
how I learned!!

This page was last updated on: August 23, 2002 by David G. Cox