Thread: Error Handler
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Auric__ Auric__ is offline
external usenet poster
 
Posts: 538
Default Error Handler

On Wed, 18 Aug 2004 13:59:30 +0100, dht wrote:

I'm trying to use an error handler that uses the Goto label command.

Sub Section_1()

On error goto handler

' my code
Exit Sub

Handler:

Cells.Select
With Selection.Interior
.ColorIndex = 2
.Pattern = xlSolid
End With
Range("G6").Select
ActiveSheet.Pictures.Insert( _
"\\\files etc pics \logo.jpg" _
).Select
Selection.ShapeRange.IncrementLeft 14.25
Selection.ShapeRange.IncrementTop -58.5

End Sub

I can't get the code after the handler error to run what am I missing /
doing wrong.


Try making this change:

Handler:
Err.Clear
' the rest of your code here

--
auric underscore underscore at hotmail dot com
*****
Excuse me, but your ass is on your chin.