End If without block If
An End If statement is used without a corresponding If statement. Check other control structures within the If...End If structure and verify that they are correctly matched. For example, a While without a matching Wend inside the If...End If structure will generate this error.
Also check that the block If is correctly formatted.