Are your neighbors complaining that your dog is constantly barking while you are away?
Training a dog not to bark while you are away may be tough to conquer but not impossible.
First you need to understand why he is barking. The breed and age of the dog has a lot to do with it too. A dog loves having you around and enjoys all the attention he gets. Making it tough for him when you are not around to have fun. When certain dogs are left alone they will get agitated and bored, looking for something to do to pass the time. Some may start barking, others will start biting and chewing on your favorite sneakers or both.
The way to discourage this behavior is like training a dog at any other skill which will be step by step with rewards and some distractions. Start off by leaving the room for ten minutes at a time while not saying a word, then returning not saying a word either. After a few minutes after returning you then can interact with your dog, as you usually will. You do not want your dog to associate good-bye or hello with a bad thing. Repeat this step and extend the time intervals. Now try leaving the house but be in range so you can hear him, if he begins to bark walk back into your room but ignore your dog. Do not let his barking be associated with you returning.
Since you know your dog is bored, depending the breed you may want to have another dog or possibly a cat to give it company. While getting a friend to accompany will help, it may not solve the problem and training will still be needed but now for both. Other distractions which sometimes work may be chewable dog bones, toys stuffed with treats, and leaving a television or radio on. You may want to use these items during your training as a distraction.
Lots of new dog owners do not realize the amount of training a dog needs and this one is usually over looked. Not only are you doing your neighbors a favor but also your dog. He will be happier, less stressed and less likely to destroy furniture in the process.