I'm trying to use this function to copy all of the selected items in my list box to an array to be used for other purposes. I get an error "Object cannot be stored in an array of this type" with the following code. However when I look at the definition of the CopyTo function, it says that it take 2 arguments (System.Array and Index).
Any ideas on how I can do this?
Dim Groups(lstGroupCode.SelectedItems.Count) As System.Array