First off… JobsList (the listbox) must be in the same scope as where the MSGBOX statement is (a module on the same window for example).
Second Listindex is an INTEGER value, so even if it could “find the item” you’d get a “type mismatch”
The statement would have to be
MsgBox Str(JobsList.Listindex)
I suggest you read the documention a bit more closely then come back with you come up with
basically your issue is not with MSGBOX but iwth LISTBOX
Listindex is an integer and MsgBox excepts a string. Xojo is a strong type cast language so you have to covert from integer to string. Something like this: