Sounds like the fault is electrical rather than mechanical then.
Start with the switch, check the connections are tight. I think there is also another connector block a few inches from the switch. Some models also have a relay close to the motor.
Pull the trim cover off and look at the connections on the motor. Its not unheard of for the roof to leak and the terminals to rust or corrode as a result.
The relays are at the back of the fuse box, so its on your back upside down in the passenger foot well with a torch, and make sure they are tight in their holders.