If I'm reading your intent correctly...
IF answer = 6 THEN (in OPO6)
I assume this is a 2nd check of the previous "Is Manual Alignment Required" query? In which case, it is not required.
If it is in response to the "Is program Rev up to date?" query, and IF the answer was 6, the answer can never be 7 since it was already set to 6, so the code would never execute.
- You want to either run, or not run, the manual alignment based on the first response?
- This is a little less clear - You want to simply prompt to update the program based on the response to question #2? Or you want to ABORT the entire run if they say it is not up to date? You want to only do this prompt if they respond a certain way to the manual alignment prompt? (that's the way this is written).
- I'm confused about what the intent is with the DO loop? Curious as well if a DO requires an END DO as well as the Exit Do.
If I can understand your intent, I can help you (Easily) clean up the logic here.
Now -- as to the error on line 11. I wouldn't think so (I'll have to test this), but maybe if you do the Exit DO it gets confused since the IF/ELSEIF/END IF are isolated? Which leaves a mismatch with number of IF's and END IF's? Just thinking. Not saying that is so!
I found part of my answer by scrolling down.
You do have an abort at the end.
I'll do some testing once I understand the intent of what the 2nd prompt is supposed to do (prompt only or exit the program) and if the 2nd prompt is only supposed to run IF you get a certain response to the first prompt?