![]() |
On Error ??
Can you have an On Error Goto ErrHandle and then once it is done handling the error resume from where the error occured
Example would be that I am copying several files to different workstations. It can't copy the file to the workstation because it is not running. This would be the error. It would then goto an error ahndle where it write this information to a log. I then want it to continue from the point that error occured TIA |
On Error ??
On error goto ErrHandler
' code to cause an error ErrHandler: ' code to write log Resume Next End Sub -- Regards, Tom Ogilvy "Kevin" wrote in message ... Can you have an On Error Goto ErrHandle and then once it is done handling the error resume from where the error occured. Example would be that I am copying several files to different workstations. It can't copy the file to the workstation because it is not running. This would be the error. It would then goto an error ahndle where it write this information to a log. I then want it to continue from the point that error occured. TIA |
On Error ??
Check out Resume Next in help.
-- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Kevin" wrote in message ... Can you have an On Error Goto ErrHandle and then once it is done handling the error resume from where the error occured. Example would be that I am copying several files to different workstations. It can't copy the file to the workstation because it is not running. This would be the error. It would then goto an error ahndle where it write this information to a log. I then want it to continue from the point that error occured. TIA |
On Error ??
Kevin,
Can you have an On Error Goto ErrHandle and then once it is done handling the error resume from where the error occured. In your error handling block, use the Resume statement to resume code execution at the line of code that caused the error. Use Resume Next to resume code execution at the line following the line that raised the error. Under no circumstances use GoTo in your error handling block. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Kevin" wrote in message ... Can you have an On Error Goto ErrHandle and then once it is done handling the error resume from where the error occured. Example would be that I am copying several files to different workstations. It can't copy the file to the workstation because it is not running. This would be the error. It would then goto an error ahndle where it write this information to a log. I then want it to continue from the point that error occured. TIA |
All times are GMT +1. The time now is 04:12 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com