Hi Mike:
It IS possible. I do that a lot with global template variables, not
Normal.dot variables, but don't see why it would not work with a Normal.dot
variable.
Here is one way.
1. Declare the Normal.dot variable as a public variable (in the declarations
section of the code module)
e.g. Public sTest as String
2. Edit the VBA projects that must read the variable:- set a VBA reference
to the normal project. (You might be able to skip this step for
Normal.dot...I'm not sure, maybe someone else has that answer). To do that,
go to Tools - References in VBA Editor and check the normal project.
3. Whenever you refer to the variable in the macro projects, precede it
with Normal.dot's VBA project name "Normal."),
e.g. Msgbox Normal.sTest
If developing for multiple users, you should test to make sure that the VBA
reference holds up under varying locations of normal.dot. It should ... the
reference hold up for varying locations for global templates, so same should
happen for normal.dot.
Watch out for run-time errors! Depending on where the run-time error
occurs, your variable may be erased and not be reliable.
Hope this helps,
Regards,
Jean
Quote:
> Is it possible to pass a variable between projects? My
> specific problem is that I set a value in the AUTOEXEC
> macro when Normal.dot loads, but then the user runs a
> variety of macros to load other templates. These secondary
> templates need to read the value of the variable, but when
> I check it, it is blank.
> Any ideas, please
> Thanks
> Mike