title: Splitting up text of listbox item into strings in VB
body: <p>Pretty new to VB, haven't been using it long and have just been learning as I go so sorry if this is a bit of a noob question.</p>
  
  <p>Basically I'm trying to create a piece of software for a business that doesn't necessarily require users to be on the same network and am currently working on an email-like messenger system. I already have the "new message" function sorted, the message gets stored on an SQL database with some other fields to help identify the messages and certain statuses such as "read" or "flagged".</p>
  
  <p>I am now trying to make the "read messages" screen and am having a little trouble. I have a timer to check for new messages and submit a string to a listbox which is basically this:</p>
  
  <pre><code>    (message id number) - (user it has been sent from) - (message subject)
  </code></pre>
  
  <p>There are no actual brackets I just mean to demonstrate the layout, and that each segment is separated by " - ". I did originally want to have each selection in the listbox to consist of 2 lines, the first being the user that it was sent from and the second being the subject, but I couldn't find anything on this anywhere so settled for the information to be on 1 line.</p>
  
  <p>Now all I have to do is figure out how to take the selected item of the listbox, and split the information up into strings. So for example I need to change somethis like this:</p>
  
  <pre><code>    100 - Admin - Test Message Subject
  </code></pre>
  
  <p>into this:</p>
  
  <pre><code>    msg_id = 100
      usr_from = Admin
      msg_subj = Test Message Subject
  </code></pre>
  
  <p>so that I could use those strings in an SQL query which would be used to get the rest of the message from the database, I hope that makes sense. I know it's such a basic thing I'm trying to do and I should really have learned it long ago but it's not something that I've needed to do until now. Well that is unless someone can offer a solution that would allow me to list the messages how I originally wanted them :P</p>
  
  <p>Any help would be appreciated :) Thanks in advance!</p>