I believe to hold the button for just a few seconds after the windows or sunroof are cycled is indeed the reset procedure
I just did this today because it was not automaticly stopping when in closed position. Turn your key on,press and hold the tilt switch. The moon roof will tilt up,close,open all the way,and then close all the way at which point you release the switch and your finished.Its called the initial programing process or something.