will need 'recoding' again if you took longer than 40seconds to change the battery... was told this by the vw tech at birmingham vw...
but to recode its a piece of cake...
get in your car, lock the door using the button the drivers door, insert the key into the ignition, turn the ignition on (lights only) press the unlock button, wait 6 seconds, keep pressing the unlock button, eventually you should hear it unlock the doors.
this has worked for me twice now on two different mk5's! good luck