View Single Post
 
Old 06-29-2022, 01:26 PM
gmaxey gmaxey is offline Windows 10 Office 2016
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,617
gmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nice
Default

Jeffery,


A personal style thing. Not always needed.


Code:
Sub Demo()
Dim oRng As Range
  Set oRng = ActiveDocument.Range
  On Error GoTo Err_Handler
  Err.Raise 6
  MsgBox "You won't see this message"
lbl_Exit:
  Set oRng = Nothing
  Exit Sub
Err_Handler:
  MsgBox "An error has occurred"
  Resume lbl_Exit
End Sub
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote