I have a dynamic array. I want to get the value of each element in the array. I tried array.value and did not work. Can someone help me with it?
Sub TargetArrayValue()
Dim Target() As Integer
ReDim Preserve Target(10)
i = 1
tgtCurrency_ID = "ABC"
'Assigns value to the Target array
For rwIndex = 1 to 100
For colIndex = 2 to 2
With Worksheets("CrossCurrency").Cells(rwIndex,colIndex)
If .Value = tgtCurrency_ID Then
Target(i) = rwIndex 'Gets the rows that has the value 'ABC'
i = i+1
Next colIndex
Next rwIndex
'Want to get the values of the Target array
???????????????????
End Sub
Thanks in advance for the help.
Sub TargetArrayValue()
Dim Target() As Integer
ReDim Preserve Target(10)
i = 1
tgtCurrency_ID = "ABC"
'Assigns value to the Target array
For rwIndex = 1 to 100
For colIndex = 2 to 2
With Worksheets("CrossCurrency").Cells(rwIndex,colIndex)
If .Value = tgtCurrency_ID Then
Target(i) = rwIndex 'Gets the rows that has the value 'ABC'
i = i+1
Next colIndex
Next rwIndex
'Want to get the values of the Target array
???????????????????
End Sub
Thanks in advance for the help.