- I have column A fully populated with values
- I have a macro that when clicked, opens outlook express and sends an email to a vertical head with the latest entry # in column A.
- No issues at all. Works fine. But I want to upgrade it
- Is there a way to find out the values populated by a given user, in a particular day, in this case, today ?
For eg:
- If XYZ populated, Range A7,A8 and A9 yesterday.
- Today, ABC populated Range 10,11 , 12 and 13:
- Then the code today, should send an email to the vertical head saying , Range10,11,12 and 13 were updated today.
My code uses the following :For finding last value in row :
Range("A65536").End(xlUp).Value
Code that sends the mail
Set oout = CreateObject("Outlook.Application")
Set omsg = oout.CreateItem(0)
Dim ireply As String
Dim LastRow As Range
Dim SigString As String
Dim Signature As String
ireply = MsgBox(Prompt:="Is your OUTLOOK open ?", _
Buttons:=vbYesNoCancel, Title:="UPDATE MACRO")
If ireply = vbYes Then
'LastRow = Cells(Rows.Count, "A").End(xlUp).row.Value
With omsg
.to = "edf@gmail.com"
.CC = "elf@gmail.com "
.BCC = ""
.Subject = "Customer Service - Request ID # " & Range("A65536").End(xlUp).Value & " added"
.Body = "Dear edf," & vbNewLine & vbNewLine & " Customer Service Department just added Request ID # " & Range("A65536").End(xlUp).Value & " to the list" & vbNewLine & "Due Date is : " & Range("L65536").End(xlUp).Value & vbNewLine & vbNewLine & vbNewLine & "Thanks and Regards"
.Display (True)
End With
ElseIf ireply = vbNo Then
MsgBox ("Alright ! I will open that for ya ")
Shell ("OUTLOOK")
With omsg
.to = "edf@gmail.com.com"
.CC = "elf@gmail.com.com"
.BCC = ""
.Subject = "Customer Service - Request ID # " & Range("A65536").End(xlUp).Value & " added"
.Body = "Dear edf," & vbNewLine & vbNewLine & " Customer Service Department just added Request ID # " & Range("A65536").End(xlUp).Value & " to the list" & vbNewLine & "Due Date is : " & Range("L65536").End(xlUp).Value & vbNewLine & vbNewLine & vbNewLine & "Thanks and Regards"
.Display (True)
End With
ElseIf ireply = vbCancel Then
Exit Sub
End If
' If omsg.Sent Then ' // HAVING ISSUES WITH THIS AS ON 10/30/2013...
' MsgBox ("Sent")
' Else
' MsgBox (" Not Sent ! ")
' End If
Set oout = Nothing
Set omsg = Nothing
'Exit Sub
'
Bookmarks