sarà...ma confrontare stringhe con numeri...

al posto del trim usa CInt