assigning variable across macros and modules

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How do I define a variable, such as
dim range as range, or
mytotal = activecell.value *2
so that they can be recalled when other macros or modules are run?

TIA
 
Declare them as Public variables, in a standard code module, prior to any
procedures

e.g.

Public rng As Range


Sub test()
....
 

Ask a Question

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.

Ask a Question

Back
Top