'Exit Sub' is not valid in a Function or Property
Exit Sub appears in a Function procedure or a Property procedure. An Exit statement must match the block in which it occurs.
Error ID: BC30065
To correct this error
- Replace the Exit Sub with the Exit Function or Exit Property statement as appropriate.