title: Timer tick when the for loop is completed
body: <p>How can I tick the timer when the for loop is completed? I don't want to run the timer every X minute, I want to run the timer when the button is clicked and then just tick the timer again when the for loop is completed..</p>
  
  <pre><code> For Each row As DataRow In MTProcessTable.Rows
    Try
              If checkKeyHelp(process.datain) Then
                  msg = msgTable.Rows(1)(1).ToString()
                  MsgBox(msg)
                  writeMsg("1 MO help at ")
  
              ElseIf checkKeyInfo(process.datain) Then
                  msg = msgTable.Rows(4)(1).ToString()
                  MsgBox(msg)
                  writeMsg("1 MO INFO at ")
              Else
  
                  MOTable = selectMO(process.mo, process.mt)
                  moRowNb = MOTable.Rows.Count()
                  MO = New MO_class
                  If moRowNb &lt;&gt; 0 Then
                      MOrow = MOTable.Rows(0)
                      MO.newuser = MOrow("newuser")
                      MO.sim_id = MOrow("sim_id")
                  End If
         Catch ex As Exception
              logFile("executeTimer ----" &amp; ex.Message)
              updateProcessed(process.id, ex.Message)
          Finally
              updateProcessed(process.id, msg)
          End Try
   Next row
  
  Private Sub start_btn_Click(sender As System.Object, e As System.EventArgs) Handles start_btn.Click
      Timer1.Enabled = True
      tm.StartTimer()
  End Sub
  </code></pre>