I am perplexed why my global variable within a module fall out of scope at the conclusion of a sub procedure.
I declare the range at the top of the module out side of all subproc and functions as below
Option Explicit
Dim TIMEDATA As Range
Dim FREQDATA As Range
Const StartLoc = "B4"
Const flowLoc = "F4"
Const dtLoc = "J8"
In my subproc I define one of the ranges.
Public Sub PortandConvertData()
<SNIP>
Set TIMEDATA = calcSheet.Range(Cells(2, 2).Address, Cells(2 + dataSize, 2).Address)
End Sub
After the sub completes in the watch window I see the variable TIMEDATA go from Range/Range to Range and the value go from correct to simply out of context.
I want to store data in the module rather than pasting in a sheet or something.
Any help is much appreciated