newbie vba environment question

  • Thread starter Thread starter lester
  • Start date Start date
L

lester

Hi, I'm trying to get going with vba. I see tons of
sample subroutines to traverse or inspect Outlook objects
and I want to use them, but how do I set this up? Where
do I begin? Do I have to create a new module with a main
() that calls these subroutines or functions? And then
how do I call this module, or get it to fire off from
Outlook once I'm done creating what I want?

thanks in advance for any help.
lesterZ
 
I get started by creating a new module and adding whatever variables and
functions/subroutines I need. I also add a "main" function, but it doesn't
have to be called that. It's just one more subroutine. In fact I'd give it
a more descriptive name.

To run the macro during coding and testing, just use the run button from
within VBA. You'll probably want to activate the debug toolbar (via View |
Toolbars) and use the step-into/-over options though. During testing you'll
probably want to also activate the watches window and the locals windows too
(via the view menu I believe).

When it's all working the way you want, the easiest way to run it from
Outlook itself is to add a toolbar button (via Tools | Customize) to allow
one-click running. (Tools | Macros is always an option too.) There are
ways to have it automatically run when the user does certain things, but for
now this should get you started.

Oh, and I assume this isn't needed, but I'll add it just in case: make
sure security settings allow macros to run. That's almost always a good
idea when trying to write macros.

I hope this helps.

Scott
 
Back
Top