#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 134
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default 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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2007 - error saving file & error loading dll TinaF Excel Discussion (Misc queries) 0 July 1st 09 01:49 PM
Visual Basic Error Run Time Error, Type Mismatch Meg Partridge Excel Discussion (Misc queries) 12 September 10th 08 06:10 PM
Counting instances of found text (Excel error? Or user error?) S Davis Excel Worksheet Functions 5 September 12th 06 04:52 PM
Syntax Error Runtime Error '424' Object Required sjenks183 Excel Programming 1 January 23rd 04 09:25 AM


All times are GMT +1. The time now is 05:55 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"