View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
cody cody is offline
external usenet poster
 
Posts: 71
Default How to end when test condition met?

Try adding the exit sub command after the if statement in the macro code.

"davegb" wrote:

I have a test in my program,

If strOrig < "DYC" Or "" Then

After the code below runs, I want the macro to end when strOrig = DYC
or is blank. How do I tell it to end?