How can I check to see if a user has clicked a Cancel button while a long for next loop is executing?

Thanks,
Kb