Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I end an Error Resume Next Procedure? 2

Status
Not open for further replies.

clrc

Technical User
Apr 26, 2008
2
Hi...need your help. After my macro runs the ErrorCapture procedure, it still goes to the third line and runs all the codes after. I'd like it to stop after it runs the error capture.
Below is the code.

Sub Macro1()
Call ErrorCapture 'SUB PROC
Sheets("RAW SEGMENT REPORT").Select

Hope you can help.

Thanks!

 
When you call a procedure the code continues at next line after quitting it. Rather redesign your code, for instance convert your procedure to function returning error flag (T/F) or add ByRef argument to the procedure argument list..

combo
 
on error goto 0 is the inverse of on error resume next

[yinyang] Tranpkp [pc2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top