Poor Barnaby sounds very sick at the moment! Vomiting and diarrhea can be caused by a number of things including GI illness, eating something rotten or toxic, a foreign body, or pancreatitis to name a few. HIs vomit is likely yellow from bile acids as his stomach will be empty from all the previous vomiting. Whenever a dog has both vomiting and diarrhea, and has vomited multiple times like he has, it's time to see a vet. The best thing you can do for him is take him into a vet now for care. Best of luck, I hope this helps.