I have different variables that I'm using to define ranges within different sheets. Whenever I switch from Sheet A to Sheet B, however, and then try to select a range in Sheet A by the name that I gave it in the vba, I get the "select method of range class failed error".
I assume it has something to do with the fact that I'm giving different ranges in different sheets names, and then referring back to them from different sheets. Is there a way to define the name of the range so that it doesn't disappear once I switch to a different sheet? I just put
Dim a As Range
where "a" is the variable for the range that I set later in the code using "Set".
Bookmarks