05-17-2024, 03:27 PM
I don't think there is present option whereby the NEXT (as in the FOR..NEXT) will automatically display the control variable after Next?? When a For is typed you get an automatic warning that you need the NEXT but if the For already has a control variable then could the warning also include the control variable? For x = 1 to 10 "Warning missing NEXT x"
I do appreciate there is a lot less typing if the control variable is not needed to complete the For .. Next but sometimes when I have a lot of nested IF statements with a lot of For..Next loops it is always a missing End If that is somewhere in that mess of code which creates a Program Flow error. Following which For goes to which Next can be a little challenging. So I was thinking is the Flow Error highlighted Next x as the loop where I can find the missing End If (as opposed to the Next y or Next Num etc in the same mess of coding) it could help.
I do appreciate there is a lot less typing if the control variable is not needed to complete the For .. Next but sometimes when I have a lot of nested IF statements with a lot of For..Next loops it is always a missing End If that is somewhere in that mess of code which creates a Program Flow error. Following which For goes to which Next can be a little challenging. So I was thinking is the Flow Error highlighted Next x as the loop where I can find the missing End If (as opposed to the Next y or Next Num etc in the same mess of coding) it could help.