Thread: Email on save
View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
Auric__ Auric__ is offline
external usenet poster
 
Posts: 538
Default Email on save

Claus Busch wrote:

Hi Auric,

Am Wed, 27 Jul 2016 18:15:27 -0000 (UTC) schrieb Auric__:

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, _
Cancel As Boolean)
saved = True
If MsgBox("Generate email?", vbYesNoCancel) = vbYes Then
generateEmail
End Sub


it is a good idea to use a MsgBox. But it is also annoying when the
MsgBox appears 600 times.
Maybe it is better to put the code in the WorkBook_BeforeClose event.


The entire idea was to remind the user about the email and give them some way
to decide whether or not to send the email. Feel free to suggest a better
option.

--
One doesn't discover new lands without consenting to lose sight of the
shore for a very long time.
-- Andre Gide