Had this happen all the time. Remove the cover plate to the sunroof motor (headliner cover plate with sun roof switch) from the back with a clean screwdriver. Attached to the motor is the gear box with an allen socket (6mm I think). Turn it a couple of turns in the direction that goes easy, it may be in the all the way open or closed position. Now you can try the switched hanging from above. It should work now. If not turn it a little more. The switch doesn't usually go bad. Check you fuse also, just in case. Had to do it a couple of times over a couple of months and then never since on my most recent Beamer.
Last edited by enginesavers; 07-24-2008 at 12:35 AM.