'Determining An Array From Variant to Integer or Single or Long

I have a workbook with many procedures where I have just used Variant as the variable type for the array's I have since learned that this is time consuming in memory and I should instead determine them as their correct variables of either long, single, integer or boolean. I have the below code, an excerpt:

Sub DeleteLastEntry()

Dim Perf As Range
Dim STW As Range
Dim Reward As Range
Dim STL As Range
Dim PerfArr() As Variant
Dim STWArr() As Variant
Dim RewardArr() As Variant
Dim STLArr() As Variant
Dim HomeData1 As Range
Dim HomeData2 As Range
Dim HomeData1Arr() As Variant
Dim HomeData2Arr() As Variant
Dim Calc1Array() As Variant
Dim Calc2Array() As Variant
Dim Calc3Array() As Variant
Dim Calc4Array() As Variant

Set STW = Sheet1.Range("GR28:IQ32")
Set STL = Sheet1.Range("KT28:MS32")
Set Perf = Sheet1.Range("EQ28:GP32")
Set Reward = Sheet1.Range("IS28:KR32")
Set HomeData1 = Sheet1.Range("B29:DA33")
Set HomeData2 = Sheet1.Range("B35:DA36")

'Create arrays.
STWArr = STW
STLArr = STL
PerfArr = Perf
RewardArr = Reward
HomeData1Arr = HomeData1
HomeData2Arr = HomeData2

'Blah Blah Blah Code

End sub

So I changed the Dims in the declarations (I have option explicit code at the top as well in case that's relevant), to Dim PerfArr() as Integer for example and no matter what type i declare any array as it comes back as a mismatch error. Am I doing something fundamentally basic wrong, can you not declare or DIM an array that refers to a range? I'm at a loss, any help please. I'm not expert at arrays so please be gentle. As an example the below comes as mismatch on all the arrays.

Sub DeleteLastEntry()

Dim Perf As Range
Dim STW As Range
Dim Reward As Range
Dim STL As Range
Dim PerfArr() As Single
Dim STWArr() As Integer
Dim RewardArr() As Variant
Dim STLArr() As Integer
Dim HomeData1 As Range
Dim HomeData2 As Range
Dim HomeData1Arr() As Single
Dim HomeData2Arr() As Single
Dim Calc1Array() As Boolean
Dim Calc2Array() As Integer
Dim Calc3Array() As Integer
Dim Calc4Array() As Long

Set STW = Sheet1.Range("GR28:IQ32")
Set STL = Sheet1.Range("KT28:MS32")
Set Perf = Sheet1.Range("EQ28:GP32")
Set Reward = Sheet1.Range("IS28:KR32")
Set HomeData1 = Sheet1.Range("B29:DA33")
Set HomeData2 = Sheet1.Range("B35:DA36")

'Create arrays.
STWArr = STW
STLArr = STL
PerfArr = Perf
RewardArr = Reward
HomeData1Arr = HomeData1
HomeData2Arr = HomeData2

'Blah Blah Blah Code

End sub


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source