Good morning, I have formulated the following code to run the macro every 2 minutes, and if there is a change in cells 03: O11, send me an email with Table4. I can't get it to work, let's see if you can help me out, please.
Code
Sub CellValueAutoIncr1 ()
rTime = Now + TimeValue ("00:02:00")
Application.OnTime EarliestTime: = rTime, Procedure: = "CellValueAutoIncr1", schedule: = True
Application.EnableEvents = False
If IsEmpty (Target) Then
Application.EnableEvents = True
Exit Sub
End if
If Not Intersect (Target, Range ("O3: O11")) Is Nothing Then
If IsNumeric (Target) Then
ActiveSheet.Range ("Table4"). Select
ActiveWorkbook.EnvelopeVisible = True
With ActiveSheet.MailEnvelope
.Item.To = "[email protected]"
.Item.Subject = "by email"
.Introduction = "Example"
.Item.Send
End with
End if
End if
Exit Sub
End Sub
Display More
Thank you so much for everything