Find out your MSL. You can download the MSL app from the market.
Dial ##msl# on the phone. It'll ask you for the MDN/MSID combo. Might be called something slightly different. Edit them to be 0000001234 for both. Commit the modifications. Once committed the phone will auto-reboot. Once the phone comes back up the phone will latch onto any account that the phone is on.
Meaning if the phone is on your account it'll latch onto yours. If you sold the phone and it is no longer on your account but on your buyer's account then it'll latch onto theirs.
This can only work once or twice without needing a complete reflash. So do not try this "just for testing purposes". The phone should not be left on and not attached to an account for long. If the phone is off your account and waiting for a buyer the phone should be left off or just taken off the account but the step with the msl should not be done. Do it only when it is ready to latch onto someone else's account. Good luck.
EDIT: Never do a ##786# reset on a flashed phone. That will definitely wipe the data settings and you'll need to get it reflashed. Voice will probably work after some hoop jumping but to get data working again data reprogramming will be needed 100%. Only do this kind of reset if you know the aaa keys and are planning to reflash it.
Mountain Dew makes me happy.
If I've helped you, a thank you would be cool.