With some key fobs, the code is lost when you replace the battery and it invents a new one when you put fresh batteries in. What you do depends on the make of car, but in principle, you open the car with the key and then teach the CAR the new code by operating the fob whilst pressing the driver's door lock down/key turned in lock or some such. Either look at the car handbook or try googling the problem with the car type i.e. "reset cntral locking alarm on Elova Cartobuy Mk3"