Depends on the region of the cart(or rom) you're using. Some codes need a (M)master code to function, other times it's using (E)European codes on a (U)Americian cart.
can you explain the problem better? is it freezing when trying to open the cheats? or do you activate them and dont work
Most likely the wrong region as I said. That or you're missing a master code. Try making sure what your cart region is, and check out the codes to see where they come from. North Americian is U- E is European- J is Japan. Those are the top three as far as games go. If you're using a E code on a U game, it won't work at all.