Hello,
I've recently completed a little bit of code and want to see it displayed in a message box. This I can do, the problem comes when it is displayed, it will read:
-1
This is my code:
The error says "Index and count must refer to a location within the string."Code:HideWelcomeScreen() HideAddItems() lst_results.Visible = True lst_results.Items.Clear() counter_search = 0 letter = Len(txt_search.Text) Do While counter_search < letter tempresult = tempresult + lst_dictionary.Items.Item(1) tempresult.Remove(tempresult.Length, (tempresult.Length - letter)) counter_search += 1 Loop MsgBox(tempresult, MsgBoxStyle.OkOnly, tempresult)
This is pointing to here:
tempresult.Remove(tempresult.Length, (tempresult.Length - letter))
What can I do here?




Reply With Quote