You may be experiencing a problem with the Immobilizer in your Volvo. You can try a different ignition key, if the immobilizer is bad, this may help.
The 1999 S80 was the first car on the road to have a fully networked computer system on board, and the Central Electrical Module (CEM) is at the heart of it. If I was diagnosing this I would erase all the diagnostic trouble codes in every computer, drive the car and try starting until the problem re-occurred and check the codes. The codes will help to point you in the right direction. I would also have all the software updated in the vehicle.