TheRaspberryPiBoy
TheRaspberryPiBoy

Reputation: 21

This error comes up "Conversion from string "found" to type 'Long' is not valid."

Im making a anti-virus in VB 10 but this error comes up"Conversion from string "delete" to type 'Long' is not valid." I dont understand how to add more then one word like "virus" and "delete" heres my code:

If TextBox1.Text.Contains("virus" Or "delete") Then MsgBox("Malicilouse file detected ",
        MsgBoxStyle.Critical) Else 
    MsgBox("The file(s) are safe")

Could someone please help me!!!

Upvotes: 0

Views: 154

Answers (1)

Simo Erkinheimo
Simo Erkinheimo

Reputation: 1397

If TextBox1.Text.Contains("virus") Or TextBox1.Text.Contains("delete") Then MsgBox("Malicilouse file detected ",
    MsgBoxStyle.Critical) Else 
MsgBox("The file(s) are safe")

Upvotes: 3

Related Questions