Hi Guys,
I'm really stuck with this code for last 6 hours now. Code is not that completed. Actually I have a range (containing text and numbers mixed) so i'm first saving the range in one variable and then I'm trying to save (or copy) the range to another Array. It works fine to this level. But when I want to retrieve ANY individual item (or index) from Array then I'm unable to do so. Can somebody guide me how to properly copy range to array that I have complete control over my array i.e. I can access any of it's indices for further processing. Here is snippet of code.
Would appreciate earliest help as I want to close this project tonight !
I'm really stuck with this code for last 6 hours now. Code is not that completed. Actually I have a range (containing text and numbers mixed) so i'm first saving the range in one variable and then I'm trying to save (or copy) the range to another Array. It works fine to this level. But when I want to retrieve ANY individual item (or index) from Array then I'm unable to do so. Can somebody guide me how to properly copy range to array that I have complete control over my array i.e. I can access any of it's indices for further processing. Here is snippet of code.
Code:
Dim strAll() As String
Dim strSNO() As String
Dim lastRow As Integer, i As Integer, newRng As Range, count As Integer
With ThisWorkbook.Sheets("Data")
lastRow = .Range("A7000").End(xlUp).Row
ReDim strAll(lastRow)
Set newRng = .Range("A1:A" & lastRow)
MsgBox LBound(strAll()) & ":" & UBound(strAll())
End With
For count = LBound(strAll()) To UBound(strAll())
strAll(count) = newRng.Offset(count, 0).Value
Next
Would appreciate earliest help as I want to close this project tonight !