Declaring variables
Public variables are static in that they retain their values even if a
particular procedure has stopped running. To be Public the variable has to
be available to all modules at all times, so they exist and retain their
values as long as your project is running (which, for Excel, means as long as
your workbook containing the code is open). So nothing special should be
needed to do what you want to do.
--
- K Dales
"Mike" wrote:
How can I set a variable to be both Public and Static? I need it to work in
two separate procedures, and I also need it to keep a running tab each time
the macro is run.
|