Hello,
I've found it useful, sometimes, to temporarily store data in an array for comparing and filtering data when moving between different sheets. I've never had any trouble with the code as it's pretty simple. But this morning I began a routine code using an array, but, for some reason, the array is not wanting to store the values that I'm trying to assign it. Perhaps someone can see where the bug is.
Here's the Code for the array definition...
'Get PCB Names into array for checking against main sheets values.
Dim PCBNames(1 To 9) As String
ThisWorkbook.Sheets("PCB Numbers").Select
RowCount = ThisWorkbook.Sheets("PCB Numbers").Range("A5000").End(xlUp).Row
For i = 1 To RowCount
PCBNames(i) = Range("B" & i).Value
Next i
MsgBox PCBNames(1) & " " & PCBNames(2) & " " & PCBNames(3) & " " & PCBNames(4) 'This produces a blank message box even though there're values in the array when I step into the debugger.
Any help provided would be much appreciated.
Bookmarks