A common issue on some circa 2000 Volvos is the ignition key getting jammed and not being able to engage the starter. There are some good guides around and I ended up using several to successfully get my V40 going again.
Initial signs on a failing lock cylinder is that the key will turn to position 1, 2 or 3 , there will be a instrument panel full of lights (if you make it to position 3) and the key will not turn to position 4 (starter). Leaving the car to rest for few minutes or jiggling the key can sometimes force the barrel.
The ignition barrel assembly in a S40 / V40 is different to the V70 and V90. This is a good thing and the Key Cylinder can be removed with a pin, whereas V70's and V90s require some drilling and two pairs of hand to remove the key cylinder.
Part number is 30887387 for a lock with a warning system and 30887389 for a steering lock. Both are discontinued by Volvo.

If you are stuck on the road. There is a quick and dirty method to get the car home. You'll need a Phillips Head screwdriver
Video Here
Ignition switch problem Volvo S40 2002

1: Unscrew the three screws holding in the lower shroud (2).
2; Unscrew the small Phillips head screw holding in the ignition switch (6)
3: Rotate the ignition switch (6) clockwise and turn the key (4)
4: if your key is stuck in 1 or 2 You can insert the key and pull out the connected ignition switch (6) completely and rotate the internal switch with a spare key/flat screwdriver.


This should get you going in an emergency.