Activate Stepper Motor with PIR sensor

I tried this loop and it works exactly as I wanted it to work
Thank you!!!!!

I added the fucntion in the loop you provided me as follow, to keep the stepper motor at rest.

while(digitalRead(inputPin) == HIGH)
{
myStepper.step(0);
}
myStepper.step(-500);

Thank you again for your help PaulS!!!!!