How do I do this without a GoTo Command?

Recommended Posts

aommaster 0

aommaster 0

I have a program that runs in a loop. The loop, in ints skeleton form looks like this:

While (certain conditions are not satisfied)

---Submit form

---Append information

---Change information that is comaparable to information in a text file

---Open Text file

---Compare and try to make a match

---If Match is found

------Messagebox "found"

---Else

------Stuff supposed to be here

---Endif

Wend

The problem arises with the like "Stuff supposed to be here". I know for a fact that there will ALWAYS be a match, regardless of the situation. So, it means that the data has been appended incorrectly.

What I want it to do is to then examine the page of information that it is at. There are two possible cases:

1.A form has to be submitted first

2.The data is on the page.

Based on that, I want it to execute the respective part of the script. So, if it finds that the the form is to be submitted, the WHOLE while loop starts over again. Otherwise, it just goes to the line where it appends information, and continues from there.