Around 12-15 months. Children understand a "menacing tone" around 12 months or so, and that followed by a removal of your attention is generally enough to engender behavior modification. The word "no" is a good word as it is short, and an easy one to remember but it was the tone, and the method it was given that was important. Saying "no honey..." in a sing-song voice is just as effective as giving him candy.
Tough call. Raising children is an art form, not a science. I can tell you from personal experience that 15 year olds sometimes do not understand the word "no". The best choice is repetition and vigilance. Good luck.