Just make sure you aren't waiting for them to relinquish the keys to your car they took to evaluate its value as a trade-in. I once had to threaten to call the police in order to get the keys back so I could leave!
Actually, never trade in your existing car at the dealer where you make your new purchase (unless you are a skilled negotiator). Typically, whatever discounts you ask for on the new car, they will quietly subtract from their "evaluation" of your old car's value.
Alternatively, have another offer in hand. CarMax is a good way to establish a minimum quickly and easily. You can always get more in the private market, but you should weigh the trade-offs in speed of transaction. (E.g., I could spend 10 hours and the next 2 weeks posting on Craigslist and dealing with people and get $12k, or I could sell to the dealer now for $10k. That might be worth it to me.)
I've done this a couple times: the first time the dealer came back with a better number, and I took it. The second time the dealer was way low and I sold on the private market for 100% more.
The real key is to separate out variables. Negotiate only on the bottom-line cash value of the car(s), and know when to walk.
Last car I bought, the dealer tried to play hardball and told me there was another individual looking to purchase the same vehicle for more. I told them to take the other offer, and put my coat on. I should have gone over and introduced myself to the other guy.