<code>
Const LB_GETCURSEL = &H188
Const LB_GETSELITEMS = &H191
Const LB_SETITEMDATA = &H19A
Const LB_ADDSTRING = &H180
Const LB_GETTEXT = &H189
Const LBN_DBLCLK = 2

Private Function GetDataFromListbox() As String
Dim Index As Long
Dim lstSize As Long
Dim lstText As String

Index = SendMessage(lngHwndlstData, LB_GETCURSEL, 0&, ByVal 0&)
lstSize = SendMessage(lngHwndlstData, LB_GETTEXTLEN, Index, ByVal 0&)
lstText = Space(lstSize)
Call SendMessage(lngHwndlstData, LB_GETTEXT, Index, ByVal lstText)

GetDataFromListbox = lstText
End Function
</code>

And lngHwndlstData is the handle to my listbox. I'm just trying to get the data from the listbox.