Hi VinceB1,
How about putting an error handler in, then handle the error as you want?
Put this at the beginning of the procedure:
On Error GoTo ErrHandler
Then before the End Sub:
'Use this to let the code terminate without going into the error handler
Exit Sub
ErrHandler:
Select Case Err.Number
Case 'put error number you want to handle here
'Put actions here
Case Else
End select
'At this point, if you haven't used a Resume or Resume Next or GoTo
'the macro will continue on and end
End Sub
> I have a document that updates many bookmarks before saving document,
>
[quoted text clipped - 20 lines]
> Im looking for some sort of procedure that if you decide not to save and
> click cancel or close the window. the code will stop running.
Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org
This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :-)
VinceB1 - 19 Sep 2006 16:04 GMT
>Hi VinceB1,
>
[quoted text clipped - 32 lines]
>This reply is posted in the Newsgroup; please post any follow question or
>reply in the newsgroup and not by e-mail :-)
Thanks Very Much Works a dream :)