Hi there folks! I am working on another review game for my class! They loved the first one!

What I am doing this time, is I am typing a series of questions with 4 possible choices(sort of like who wants to be a millionaire kind of thing)

The questions look like this in the textfile

How many provinces are there in Canada? 5, 10, 13, 15 *10

The *10 in this case would be the correct answer. The program picks a random question, and puts the line in a label caption called PickLBL. I would like to separate the 4 possible choices for answers and put them in a label array called ChoiceLBL(0)-(3). All questions will have 4 choices. The one with the *before it is the correct answer and I would like to cut off that and put it into the RightANS.caption, so when the student picks their choice, the program will compare their choice to the right answer to see if it is the correct answer.

What I have done so far is used MID$ to cut off the question itself

VB Code:
  1. Public Sub GetQuestionFromLabel()
  2. Dim intPos As Integer
  3.  
  4. Dim strQ As String
  5.  
  6. intPos = InStr(PickLBL.Caption, "?")     ' Locate the position of the "?" in PickLBL.Caption
  7. strQ = Mid$(PickLBL.Caption, 1, intPos - 1)     ' Copy up to but not including the "?" sign to strQ
  8.  
  9. QuestionLBL.Caption = strQ & "?"
  10. End Sub


Now that I have the question I am stuck on how to cut of the multiple label captions because they are separated by commas. I can use RIGHT$ (I think) to cut off one of those answers with a comma, but would it work with 4 commas separating possible choices?

Your expertise in this project is greatly appreciated as always!

Thanks!