Hello there everyone. I have borrowed code from a previous project. What it does is search a listbox for a phrase, then if it finds the phrase it will turn some buttons invisible.
In this case the listbox is called StudentChoices(0), and checks for previous choices the student has made for literacy time. Example Read On Your Own. The choice is there in the listbox word for word, in the same upper and lower casing, but for some odd reason it will not find it, and turn the other stuff to be invisible. Have I screwed up trying to set up what to search for?
There is only one item in the StudentChoices(0) listbox at this time, which is Read On Your Own, so I am at a loss here. All help will definitely be appreciated!
VB Code:
Public Sub CheckChoiceListStudent1() 'THIS CODE WILL CHECK TO SEE IF THE STUDENT HAS PICKED THE CHOICE YET ' IF THEY HAVE PICKED THE CHOICE, THEN IT WILL NOT BE VISIBLE 'CHECK FOR READ ON YOUR OWN Dim i1 As Long For i1 = StudentChoices(0).ListCount - 1 To 0 Step -1 If InStr(UCase(StudentChoices(0).List(i1)), "Read On Your Own") Then ReadToSelfBanner.Visible = False ReadToSelfList.Visible = False ReadSelfCountLBL.Visible = False End If Next End Sub
In this case the listbox is called StudentChoices(0), and checks for previous choices the student has made for literacy time. Example Read On Your Own. The choice is there in the listbox word for word, in the same upper and lower casing, but for some odd reason it will not find it, and turn the other stuff to be invisible. Have I screwed up trying to set up what to search for?
There is only one item in the StudentChoices(0) listbox at this time, which is Read On Your Own, so I am at a loss here. All help will definitely be appreciated!