Jay
Mon Aug 11 13:19:08 PDT 2008
BearMarquez wrote:
> I defined a variable in the Options Explicit area but I need it set
> to an initial value to it. This is in WORD 2007 VBA code.
Put it on the left side of an assignment statement in some procedure,
preferably the procedure that runs first.
Also, be sure you really need the variable to be in that area, which makes
it a "global" variable. The trouble with global variables in general is
that, while they're available in all procedures, they can also be changed in
any procedure, which makes them susceptible to faulty logic ("bugs"). If you
can achieve the same thing by passing parameters, that's much safer.
--
Regards,
Jay Freedman
Microsoft Word MVP FAQ:
http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.