Storing a range variable in a cell

D

Dreaded404

I am writing a VBA script and I need to frequently load and store a range as
a long-term variable. How do I store an actual range as a variable so that I
can have a function load it and save it? I need to do this because I am
using the Application.OnTime function and will need to call a subroutine to
execute a complex series of actions.
 
B

Bob Phillips

Just put someything like Sheet1!A1:M10 in the cell as use

Set myRange = Range(Worksheets("Sheet1").Range("A1").Value)
 

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

Top