My little guy does that too, and has ever since he learned to bark. When aever I tell him not to do something he barks at me, if I say he can't come up while we are eating - he barks at me. Or when I am going to bed ans he wants to play - he barks at me. I firmly tell him no again, and if he continues I spray him with the water bottle (mixed with vinegar). Sometimes he stops, but sometimes he doesn't. If he doens't he goes in his crate for a few minutes. I don't know if it's going to help him to learn, so if you have any other suggestions... feel free.