Alain,
Thanks for editing my code. One small note though.
You changed the delay from 2000 to 2 but I think you missed that I was using PauseUS. If you want 2ms between steps then it should be Delay=2000. Also, using Pulsout takes more program space than manually toggling the pin. But, as have been said, many ways to do the same thing.

Astanapane,
One last note, when you get to running the motor, make sure you start running it slow. If the speed of the pulses are two fast the motor won't be able to follow and will stall. No harm done but it might look like something is wrong. If you want to run at high speed you need to provide some acceleration/deceleration ramp instead of simply starting at the desired velocity.

Keep up the nice work!

/Henrik.