With Dylan we just kept perseveering with the yelping and turning away. It felt like it was never ending, and occassionaly got worse when he was teething, but then you just realise that you cant remember the last time he actually nipped you!
Now he very rarely even uses his mouth - he's all paws and barking! And if he does bite accidently, even when over excited its still really gentle and if you say ouch he'll lick your hand like mad! He's a right sweety.