i'm creating a anti-virus and I'm having a little trouble deleting the viruses. Here is my code:
If threatsLb.Items.Count > 0 Then
threatsLb.Enabled = True
Dim KillFile As String
KillFile = threatsLb.SelectedItem
If Len(Dir$(KillFile)) > 0 Then
SetAttr(KillFile, vbNormal)
Kill(KillFile)
End If
End If
Basically, if there is a virus then the address of the virus will be stored in a list box. But the 'KillFile = threatsLb.SelectedItem' isn't selecting any of the items in the list box. I know I'm doing something wrong... can you guys help? thanks!