How do i use the 'For each' statement?
<p>I'm working on a anti-virus and basically, when I scan my files, all the threats will be added to a list box and I'm trying to use a 'For each' statement to delete every item in the list box.</p>

<p>My code:</p>

<pre><code>For Each threat As String In threatsLb.Items
    threatsLb.Select()
    Dim KillFile As String
    KillFile = threatsLb.SelectedItem.ToString()
    If Len(Dir$(KillFile)) &gt; 0 Then
        SetAttr(KillFile, vbNormal)
        Kill(KillFile)
    End If
Next
</code></pre>

<p>Any suggestions why it isn't deleting the files from the items in the list box?</p>