qb45ener.hlp (Topic list)
NEXT without FOR
Each NEXT statement must have a matching FOR statement.
 
Also verify that other control structures within the
FOR...NEXT structure are correctly matched. For example,
an IF without a matching ENDIF inside the FOR...NEXT
structure generates this error.
ERR Code: 1