Declare the variable outside of and before any procedure declaration. Use
"Public" instead of "Dim" if you want to variable to be visible from any
module (not just the module in which it is declared) or use "Private"
instead of "Dim" if you want the variable to be visible only from within the
module in which it is declared.
--
Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group
Pearson Software Consulting, LLC www.cpearson.com
(email on web site)
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.