I have a chess program...i want it so that when i click on a piece, it will go through an If statement and determine which type of piece it is that was clicked on, but im having some problems. Here is what i have so far inside of my function

If Square.Picture = ("Z:\Pawn.bmp") Then
MovePawn()
ElseIf Square.picture = ("Z:\Rook.bmp") Then
MoveRook()
ElseIf ....

I think you can get the picture of what im trying to do...but the problem is that when i run the program, i get a

Run-Time error '13':
Type Mismatch

When i hit the debug button it highlights the line of the if statement that says

If Square.Picture = ("Z:\Pawn.bmp") Then


I have no idea what is wrong. With my logic, it seems like it should work...any ideas?