I am trying to understand what is the value of str especially when no initial state has been set.
When I analyse in immediate window it shows the first value as str ="word|" and cell = "word"; but without setting str var first, how is this even possible?
Dim str As String
Dim arr() As String
If Not Range("A2:A5") Is Nothing Then 'need to change range object later
For Each cell In Range("A2:A5")
If (cell <> "") And (InStr(str, cell) = 0) Then 'what is the value of str here?
str = str & cell & "|"
End If
Next cell
End If
If Len(str) > 0 Then str = Left(str, Len(str) - 1)
arr = Split(str, "|")
Me.FANumbers.List = arr 'populate listbox
Bookmarks