title: I need to highlight a particular line when the list of batches or line displayed on the screen based on current date and time
body: <p>I am writing a code to highlight the list of batches or lines of data in my screen based on the current date and time.</p>
  
  <p>This code is in Visual basic, in my screen i will get a list of batches like</p>
  
  <pre><code>11212\1113 
  3232\14313
  </code></pre>
  
  <p>I need to highlight the one of the batch based on the current date and time.</p>
  
  <p>I have tried the below code for selecting the batches, but it is highlighting for every batch when it is displayed and once the next batch is displayed in the screen the above highlighted thing will be gone.</p>
  
  <pre><code>                 Dim i As Integer
                   For i = 0 To lstBatches.ListCount - 1
                      MsgBox "i : " &amp; i
                      lstBatches.Selected(i) = True
                   Next i  
  </code></pre>
  
  <p>in the above two mentioned batches when the first is displayed it is highlighting but when the second is going to display the first one is not highlighting, i need the two or one batch need to be highlighted and it should not dis-highlight when the other batch is loading based on the current date time.</p>
  
  <p>Thanks in Advance.</p>