Take out the old one and put in the new one straight away.
If you leave the fob without a battery for a while you will loose the code. .
Sorry to hijack the thread but when I bought my zed the spare key didn't have a battery in it and now I realise why it won't work when I replaced it. Do you know how to get the code "back"?