For future reference this doesn't work on 156s...
I repaired my keyfob a few weeks ago due to the main lock/unlock microswitch falling off, but couldn't get it back together properly (although it worked fine). Finally took it all apart and put it back together tonight, only to find that although the red light flashes and it all appears to work fine, the car doesn't recognise it any more. I cautiously checked this thread, and went out to the car armed with a screwdriver (handbook says the fusebox screws closed), a torch and my keyfob. Tried holding door unlocked... red light still flashed. Opened door, alarm went off. In the street. Curtains start going. Quickly turned the ignition on... still going off. Off, on, off on, start... still going off. Opened fusebox, pulled out relevant fuse, still going off.
Finally resorted to driving the car away until I found a quiet carpark. Absolutely nothing would silence the car, so I sat there wondering what to do. Finally it stopped. Turned the key... started going off again. It seems though that leaving the fuse out eventually does silence it - after 15 mins in a dark carpark expecting the police to arrive it finally shut up. Maybe there's a capacitor in the alarm system which runs down. Anyhow, I now have barely any gauges as the fuse is one of the main services ones, but at least the alarm's stopped.
For reference the car is an 03 plate 2.4JTD.