user3313770
user3313770

Reputation: 1

Debugging type mismatch error in function

Why am I getting a type mismatch error on line 4 when I execute the below code?

Function delete()
    delete= True
End function
delete() = False
if delete() = False then
    MsgBox "Yes"
else
    MsgBox "No"
end if  

Upvotes: 0

Views: 268

Answers (1)

Siva Charan
Siva Charan

Reputation: 18064

You can't assign a value to a function this way delete() = False

You need to remove this line delete() = False. I don't see any use with line 4.

Upvotes: 3

Related Questions