I need to pass the value of the selected item in a listbox to a procedure - simple enough, but I am testing some code and nothing seems to work. I tried Microsoft's exmaple, but they use List and VBA throws an error. I can't even get the below to create a message - well, it creates a message, but the value is always -1. There is only one column with four items - All, Permanenet, Contractor, Vendor.
Private Sub cmdCheck_Click()
Dim x As Integer
Dim msg As String
For x = 0 To Me.lstType.ListCount - 1
If Me.lstType.Selected(x) Then
msg = msg & Me.lstType.Selected(x) & vbCrLf
MsgBox "Message:" & msg