I'm trying to use the Array.Exists function and having problems with it. I tried using the Help but it only shows examples in C++/C#. Here is what I have and what it's giving me back.
When the highlighted code is executed....I get an "Object reference not set to an instance of an object" error.Code:For Each row As DataRow In dsQVElements.Tables("tblQueueView").Rows If arrQueueView Is Nothing Then ReDim Preserve arrQueueView(x) arrQueueView(x).groupID = row("groupID") arrQueueView(x).labelName = row("labelName") arrQueueView(x).sortOrder = row("sortOrder") x += 1 Else If Array.Exists(arrQueueView, row("labelName")) Then Else ReDim Preserve arrQueueView(x) arrQueueView(x).groupID = row("groupID") arrQueueView(x).labelName = row("labelName") arrQueueView(x).sortOrder = row("sortOrder") x += 1 End If End If Next




Reply With Quote