So, one evening a few weeks ago I locked the car using the remote key fob and everything was fine but when I returned about an hour later pressing the buttons on the remote did nothing (no sounds, no lights). I could lock/unlock the driver's door manually by turning the key in the lock. The other three doors and tailgate could then be unlocked by turning ignition on. First thing I tried was to replace the key fob battery but this did not help. I then tried the spare key but this had also stopped working. I then tried the various ways of re-syncing the keys as posted by members here and elsewhere (combinations of turning ignition on and pressing buttons on the key fob) but this also did not help. In desparation, I read my owner's manual which says "press one of the buttons on the remote control key, then insert the key in the door lock and either lock or unlock the vehicle once, re-synchronisation process should not take more than 1 minute" (date of publication 15.02.2002). This also failed. I then decided to try the advice from here:
https://www.audi-sport.net/xf/threads/remote-key-fobs-stopped-working.241061/
I disconnected the CCU completely and left it like that overnight to contemplate its failings. The following day, after reconnecting everything, both remote control keys now work again (after re-synching). The re-syncing procedure described in the owner's manual did not seem to be the correct one, though I may have misundestood it's not terribly clear. However turning on and off ignition and pressing a button on the remote, as others have suggested on here, seemed to be what did it as the desired result was immediate then. A happy ending!
https://www.audi-sport.net/xf/threads/remote-key-fobs-stopped-working.241061/
I disconnected the CCU completely and left it like that overnight to contemplate its failings. The following day, after reconnecting everything, both remote control keys now work again (after re-synching). The re-syncing procedure described in the owner's manual did not seem to be the correct one, though I may have misundestood it's not terribly clear. However turning on and off ignition and pressing a button on the remote, as others have suggested on here, seemed to be what did it as the desired result was immediate then. A happy ending!