The roof is actually a very simple construction with 4 motors (rear latches, deck cover latch, main roof, front latches) and a similar number of microswitches and potentiometers (position sensors).
There is roof ECU which is a simple logic system, and there is a 7 (I think) step sequence to opening and closing the roof.
In 99% of cases, the problem is a switch, broken wire, or potentiometer that has become dislodged or broken, and the system cannot tell if one of the steps has completed or doesn't get a consistent/expected state.
Unfortunately, given the last of these cars were made 18 years ago, there are very few Volvo dealers with any mechanics that know anything about them, and although any fault codes from the roof ECU and sensor values can be read and cleared by VIDA, to test actuations and program new components in, VIDA's predecessor (VST2000) is required and they are near non-existent today. Hence they best way forward is to find an independent chap - and Paul Mountain is one such person - highly regarded on forums - but he does it as a hobby I think.
Anyhow back to your roof - you can manually close it if you can find the manual roof tools - there should be a cranked allen/Torx key and a T-bar tool.
- Open the boot and locate the two holes in the rear bulkhead to insert the tools, you need to lift up a flap of boot lining carpet to do that
- Insert the T-bar tool (widest leg) into right hand hole and turn anti-clockwise* as far as you can - you will hear a few clicks and clunks - this operates a gearbox so you can manually operate the roof, disconnecting one of the motors. You then turn it back just one click.
- Insert the torx end of the cranked handle into the left hand hole and turn clockwise
whilst pushing down hard on the middle of the tension bow - this should draw the roof seal down onto the top of the deck and complete the closing cycle.
You will need to experiment - by very gentle - *I may have got my clockwise/anti-clockwise directions mixed up as it has been a few months since I have done this.
First task is finding the tools, usually they are in the pocket of the boot, spare wheel well or glovebox, sometimes in a tool wallet.
EDIT: Just found this - it may help :
https://volvoforums.com/forum/volvo-...en-roof-69965/