I am not sure I get you, but if you variables cannot refer to a worksheet cell within their declaration, the best you can do is load them within code. So you cannot do anything likeOriginally Posted by Dowsey1977
you have to do it as a declaration and a bit of code.Dim myVar As String = Worksheets("Sheet1").Range("A1")
If you have massive macro, a couple of suggestions:
- add a separate module for you your public variables and constants
- break the macro down into many functionally separate macros
- maybe even create separate modules for separate functional categories and spread the macros over these.
.