I like to allow users the opportunity to cancel out of long loops if they need to. I use a global variable, something like gbCanacel, which gets set to True when the user clicks the Cancel button.
Then my looping checks for this with an if statement, normally the last thing inside the next/loop statement. If it detects that gbCancel is True, then I reset gbCancel and exit the sub. With liberal use of DoEvents this works quite well.
If you implement Cancel, do you do it the same way. If not how and why!!!!
What kind of form is that where the end user can click the cancel button while you’re in the middle of a VBA routine? My assumption was that while code is running, buttons are disabled. More detail please.
–JP
Ross
Yep same approach, opposite logic (if bContinue? at the top)
well one of us must be backwards then!
Zoo sex….
Zoo sex. Animals sex zoo. Free zoo sex. Sex and the spotted hyena national zoo fonz….
Acyclovir….
Acyclovir picture. Usage of acyclovir for ramsay hunt syndrome. Acyclovir seizures. Acyclovir….