ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   if error encountered in for next loop (https://www.excelbanter.com/excel-programming/433457-if-error-encountered-next-loop.html)

Craig

if error encountered in for next loop
 
How do I program if an error gets encountered during running commands within
a for next loop, to not stop the macro but continue processing the commands
until the loop ends?

how do I program to tell me what the error exactly was while the loop was
processing so I know what it was to fix it?

thank very much for any assistance



Mike H

if error encountered in for next loop
 
Craig,

Error handling in VB isn't a one-line answer, there are many options. Have a
look at Chip pearson'e site.

http://www.cpearson.com/excel/ErrorHandling.htm

Mike

"Craig" wrote:

How do I program if an error gets encountered during running commands within
a for next loop, to not stop the macro but continue processing the commands
until the loop ends?

how do I program to tell me what the error exactly was while the loop was
processing so I know what it was to fix it?

thank very much for any assistance




All times are GMT +1. The time now is 03:00 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com