Prova a trasformarli entrambi nello stesso tipo di dato...

if CInt(anno) = CInt(xA) then