Cancel Dialog

VickyC

Registered User.
Local time
Today, 13:52
Joined
Aug 31, 2005
Messages
18
Good Morning

I have created a Bill Template, and to make sure that the bill has been refreshed, (i.e F9) I have written code to pick up a command and refresh table figures.
The code I have is as follows:

Sub FileSave()
For Each SingleField In ActiveDocument.Fields
SingleField.Update
SingleField.ShowCodes = False
Next
ActiveDocument.Save
End Sub

The problem I am having is if the user clicks on Save and then clicks Cancel they are getting a debug error.

Does anyone know how I could get around this?? Is there is code to stop this happening??

I appreciate any help. Thanks,
 
If you are getting a debug error then this will be error in the code you have written.

Place error trapping code in the module and then place a breakpoint at the beginning of the sub/function in questions and single step through the code.

or

when the debug message click debug and a line of code will be highlighted. this is the line in error.
 

Users who are viewing this thread

Back
Top Bottom