Alvin Demonstrates Leave It - The Cookie Is Left!
As explained in the It's Pawsible! Dog Training and Puppy Training DVD, teaching the command is done in phases. (If you are unfamiliar with this instructional tool, it emphasizes basic obedience training for puppies and dogs.)
In Phase 1 of the Leave It command, your pup is on a leash so he can't get the treat you want him to wait for. You (hopefully) can forget the leash in Phase 2. And in Phase 3, not only is he off leash, but he has to do something else before he can get the treat. See Puppy Training Tip - The Leave It Command for details.
Alvin's trained to Leave It. He demos the command in the VID here.
Simon's too much of a chowhound - he's still on leash, but I see the encouraging signs of less strain on the leash and more restraint on his part.
My experience is that although the Leave It command takes a while to perfect, it's worth the effort. Say the command at the right moment, and your obedient pup will literally Leave It (alone). If it's something dangerous, like scissors or a knife, you've saved the pup from injury. If's it's a dangerous substance, like a prescription pill, you've saved a trip to the vet.