What pill did you have to give him? That's really unusual to give them a solid pill.
Without knowing what it is, my initial suggestion is to crush it up into a powder, mix it with water, have your vet give you a plastic syringe (or get one at a pharmacy), and squirt far into his mouth.
Chameleons have their airways on the middle of their lower mandible, like where your tongue is. It's not down their throat like with us, so you can stick the syringe far back in the mouth and squirt gently and he should swallow it without problem.