Backing Up Macros
Why I Write Ezine Articles and Not Novels…
It was a dark, cold night. He sat by the window watching the old
birch tree bend and sway in the wind. The rain was coming in sheets now
and lightning was bursting all over the valley. He was chilled to the
bone. The blanket wrapped around him was the warmest in the house and
the fireplace across the room was emanating plenty of heat. He hadn't
been outside all day, and until an hour a forehand, he had been warm.
Even now however, whenever he thought of "it," shivers shot up
his spine and his fingertips seemed to get colder. "It" wasn't
even mentionable; he couldn't dwell on "it," and he nearly
burst into tears when his wife brought him a mug of hot cider and asked
if he'd been able to finish his work before the electricity went out.
Nevertheless, he knew he had to face reality. His savings account,
not to mention his wife and 3 kids, depended on it. When was the last
time he had hit save? Did that bright flash from the monitor only affect
the monitor, or was more damage done? Only time would reveal the
answers; time that seemed to drag on and on; turning seconds into
minutes and minutes into hours. He'd promised the client he'd have the
whole kit and caboodle sitting in their email by 8:00 the next morning.
Weeks had gone into this project. Weeks that were probably down the
drain, he resolved.
Then came the regrets. Why did he have to buy the cheap surge
protector? Why didn't he make more regular backups? Why didn't he ghost
his hard drive? "Guaranteed," he said aloud "if anything
is left, I'll buy a new surge protector tomorrow. No, I'll go farther,
I'll even buy a UPS. My CD burner is going to get a workout because I'll
be backing up on a regular basis!"
And that, my friends, is why I haven't written any novels. I guess
I'm just not as tantalizing as Robin Cook or Michael Crichton. I am
creating a new "survivor" fund. If you've survived my attempt
at suspense and want to keep me out of the business permanently, email
me for more information.
On a more serious note, isn't this everyone's worst nightmare?
Whether it's a storm, a virus, corrupt disks or files, or a slew of
other possibilities, losing work or memories is an awful feeling.
Luckily, there are ways to combat data loss. It just takes a bit of
effort on our part.
Since my contribution to ABC deals with macros, I'll show you how
to back up your macros. The process is the same in most applications
that use VBA.
First of all, you should understand that macros are not typically
separated from the files from which they are run. So, for example, if
you have a macro in a workbook in Excel, when you back up the workbook,
the macros are automatically saved with the new workbook. Same thing
applies with macros in Word documents, Access databases, PowerPoint
presentations, etc.
If you use a macro with more than one file, it may be stored with
Personal.xls in Excel or Normal.dot in Word. By backing up these files
the macros are also backed up (surprise, surprise!).
There may be an occasion when you want to export a macro and back it
up without having to backup the entire file. To do this, open the Visual
Basic Editor (usually by pressing Alt+F11). In the project explorer,
right-click on the module, form or class that you wish to save, select
export and save it. Now you'll have your macro backed up.
Congratulations go to Julie of Bozeman, Montana! She wins the Olympic
pin from last month for her question about dates. She has a hard time
getting them, and even when she does, she's not sure she understands
them. She assures me that her location in rural Montana has nothing to
do with it. Anyway, stay tuned next month to see another side of me as I
try to help Julie with her, uh… problem. How's that for suspense?
The offer still stands this month: $5.00 to anyone who sends me an
idea or question that I can address in this column.
<<<back to ABC table of
contents
Chad K. Welch works as a technician/enabler in
Utah. He is available for
consulting or application programming with Microsoft Office and VBA.
Do you have a question or
tip you’d like to have Chad address in this column? Send an
email to linda@personal-computer-tutor.com
or contact him directly at chad@welchkins.com for more information.