Email on save
On Friday, July 29, 2016 at 3:43:28 PM UTC-4, Claus Busch wrote:
Hi Paul,
Am Fri, 29 Jul 2016 12:12:31 -0700 (PDT) schrieb Paul Doucette:
Yes, that's correct. A through J in that order.
in a standard module:
Public LRowOld As Long
Sub RowCheck()
LRowOld = Cells(Rows.Count, 1).End(xlUp).Row
End Sub
In module of Sheet1:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count 1 Then RowCheck
End Sub
In module of workbook:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
Dim LRow As Long
LRow = Sheets("Sheet1").UsedRange.Rows.Count
If LRow = LRowOld Then Exit Sub
'Insert here the code to create your email
End Sub
Regards
Claus B.
--
Windows10
Office 2016
Hi Claus.
This is working very well! So far no complaints!!
I have one more modification to the code they are wondering about, if it is possible :-) It is now sending the email with a message in it. Could we get it to send the email with the information from the new Row(s) that has been entered? That way they would be able to see the new information at a glance and not have to open the workbook if they do not feel the need.
Thank you again! Paul
|