Sunroof sometimes works and sometimes doesn't on 2003 Volvo S60

Rookie cbe0621eac06868b3efe0d8d1d3611e23c60d3114864ea2ec19a68cfbd3eebab
I have a 2003 Volvo S60...ocassionally the sunroof won't it didn't work in the AM, then later I tried it and it worked, then when I went to leave the car it wouldn't close...any tips? solutions? I don't want to leave it open all night on the street:(
(1) Answer
Can be a faulty switch or a faulty motor. Wouldn't hurt to just try periodically to get it closed, then have a diagnosis performed at a more suitable time.