Avatar

Level 3

I will try to word this the best that I can. Let's say i have two dropdown menus, 1st menu contains choices 1-5, the 2nd menu: choices 6-10. If choice 1 is selected on the first drop down, textboxAlert will auto-populate with the sentence "Display sentence 1". If choice 2 is selected, "Display Sentence 2" is displayed, and the previous sentence is erased. Onto the second dropdown menu, If i choose choice 6, "Display sentence 6" is shown in textboxAlert, along with the sentence from the first dropdown. So, for example's sake, I choose choice 1 on the first dropdown and choice 6 on the second dropdown.

textboxAlert will read:

Display Sentence 1

Display Sentence 6

Now here is where it gets tricky, and where my question arises. I currently am using VARs to add the sentence, so textboxAlert = oldV + "/n Display Sentence 1", where oldV stores the text in textboxReminder right before the sentence is added. I already figured out the issue of adding duplicate sentences, so no worries on that problem. Let's say I go back to the first dropdown menu, and now select choice 3. textboxAlert will now read:

Display Sentence 1

Display Sentence 6

Display Sentence 3

However, I would like it to read:

Display Sentence 3

Display Sentence 6

Because I am adding sentences to the same textbox, I cannot erase just the first line of text and replace it with the sentence I would like, without compromising the second line of text. Any thoughts on how I can accomplish this? Is there any way to search for a string of text within a textbox, and delete that string? Thanks, let me know if this needs more clarification.