http://www.therangerstation.com/tech_library/speedometer.shtml
Click on that link^.
See the 2nd and 3rd pictures?
See if your transmission has the type of VSS in the 3rd picture installed. (I'm pretty sure it does).
If so, replace that sensor (and reinstall your gear onto the new one).
I say this based upon the fact that your CEL only comes on while the vehicle is rolling.
This sensor tells the computer that the truck is rolling.
If you have a manual transmission, this sensor is really easy to see and replace. It sits on the Driver side and is held in by one 10mm bolt through a mount fork. Remove that bolt and the only thing holding the sensor in is an O-ring and years of crud.
If you have an Automatic transmission, I can't tell you where that sensor lives. I also doubt that it is that sensor being bad if you have an Auto, because the shifts should be terrible if the computer has no speed signal.
Check out this link for reading the codes. Yours should still be in memory even though the CEL has gone out.
http://www.therangerstation.com/tech_library/OBD_I.shtml
"Memory codes are problems that the computer has noticed in the past. If for example there was a loose wire to a solenoid that only lost contact while driving but was making contact while testing the system there would be NO HARD FAULT CODE. The code would show up IN MEMORY. The same would happen for a sensor that only went out of range occasionally. Memory codes come out AFTER the separator pulse.
NOTE: The computer will erase the memory after a certain number of engine re-starts if the problem does not repeat itself. The number of re-starts varies from 20 to 80 depending on the year of the vehicle. The later models keep memory longer."
Welcome to The Ranger Station and good luck with fixing your truck!