To replace a BMW remote key contact a local dealership, and to reprogram the key, place the key in the ignition and follow one of two sets of directions. There are two different BMW key shapes, round and diamond-shaped, and the directions depend on these shapes.
To reprogram the round BMW key, enter the car and close the door before inserting the key into the ignition. Look at the ignition and turn the key to position one, and then turn it back to position zero. Remove the key and press and hold the button that unlock the car. Keep the finger on the button while pressing the BMW emblem button to lock the door a minimum of three times in 10 seconds. Remove the finger and look at the light on the key; make sure it flashes for about 10 seconds, and listen for the doors to lock and unlock, which shows the programming is complete.
To reprogram the diamond shape BMW key, unlock all of the doors, insert the key and turn it to position one before turning it off. Do this within five seconds of getting into the car, or the system may not recognize the reprogramming. Remove the key, press the unlock button and keep a finger on it while pressing the BMW button three times. Remove the finger from the BMW button and listen for the car to lock and unlock, which means the reprogramming was successful.