I don't even know the correct terminology for this, so I will try to explain.
I have a list box that I populate with values from an object (Item), one object per row.
lstThing
Now I want to select and use the value in that row to pass it as a reference to the object in another method.
Private Sub xyz
' declare the variable
Dim thing As Thing
Dim addThing As AnotherThing
' I get an error with this:
getThing = lstThing.SelectedValue.ToString
'Do Stuff
addThing = _Machine.doSomething(getThing)
End Sub
Trying to pass the object associated with getThing to addThing, but get an error "Value of Type String cannot be converted..."
VB suggests using cType to convert, but that doesn't work either.
I know it's something very elementary, but I can't figure it out!