title: Sending an automatic email from Excel when a cell reaches a value that will increase
body: <p>I have an excel worksheet which I have already got a change event and module set up to automatically send and email when a cell reaches a certain value in one column.</p>
  
  <p>I need to set up a new change event and I assume module for a different column to generate an automatic email when the value reaches a certain figure.  My problem is this figure will always be increasing, and i  need the email to be sent once the column reaches every +300 from the previous email sent.  ie if the email is sent when the value reaches 1904, i need it to then send when it reaches 2204, then 2504 and so on.</p>
  
  <p>I've tried changing some codes from examples but it doesn't seem to be working.  I don't really know how to write the codes so assistance would be appreciated:</p>
  
  <pre><code>Private Sub Worksheet_Change1(ByVal Target As Range)
  If Target.Column = 204 Then
      If Target.Value Mod 300 = 0 Then
          Call EngineHoursW01T
      End If
  End If
  End Sub
  </code></pre>
  
  <p>Module - </p>
  
  <pre><code>Sub EngineHoursW01T()
      Dim OutApp As Object
      Dim OutMail As Object
      Dim strbody As String
  
      Set OutApp = CreateObject("Outlook.Application")
      Set OutMail = OutApp.CreateItem(0)
  
      strbody = "Hi" &amp; vbNewLine &amp; vbNewLine &amp; _
            "Please service Pump" &amp; vbNewLine &amp; _
                "" &amp; vbNewLine &amp; _
                "Kind Regards" &amp; vbNewLine &amp; _
                "xxxx"
  
      On Error Resume Next
      With OutMail
          .To = "email address"
          .CC = ""
          .BCC = ""
          .Subject = "Service of Pump"
          .Body = strbody
          .Attachments.Add ("")
          .Display
      End With
      On Error GoTo 0
  
     Set OutMail = Nothing
      Set OutApp = Nothing
  End Sub
  </code></pre>