I have this script

public tMonths
Sub LoadMonths()

Set shtMesi = Workbooks(w).Sheets(sht)
LastRow = shtM.Cells.SpecialCells(xlCellTypeLastCell).Row
LastCol = shtM.Cells(1, 255).End(xlToLeft).Column

ReDim tMonths(LastRow, LastCol)
For R = 1 To LastRow
For C = 1 To LastCol
tMonths(R, C) = shtMesi.Cells(R C)
Next
next

end sub


If i write this

public tMonths
Sub LoadMonths()
Dim lRange As Range
Dim tMonths as Variant
Set lRange = workbooks(w).sheets(sht).Range(range)
tMonths = lRange.value
end sub

and i try to call from another macro i get error using tMonths
What do i wrong?