I have a beforesave event that checks to see if any changes were made to the spreadsheet, to check for errors, and to save and send an email.
For some reason - the part of the code that is for saving and emailing is running twice - so 2 message boxes are shown and 2 emails are sent.
I dont understand why this is running twice. Any help is appreciated.
(if you need the whole code let me know - but here is just the part that is running twice)
For some reason - the part of the code that is for saving and emailing is running twice - so 2 message boxes are shown and 2 emails are sent.
I dont understand why this is running twice. Any help is appreciated.
(if you need the whole code let me know - but here is just the part that is running twice)
Code:
'if no errors - then save
If a = 0 And b > 0 Then '(a is to count errors) (b is to count changes)
ans = MsgBox("ALL INFORMATION IS PROVIDED - Spreadsheet will now SAVE and EMAIL to Minnie.Walker@brinksinc.com", vbwarning + vbOKOnly)
If ans = vbOK Then
Save
Call Sheet1.SendMail
End If
End If