I would think it would have to be running for a code to be thrown. Like for my secondary O2 sensor......I could reset the ECU by disconnecting the battery cable and the CEL wouldn't come on until I started the car and let it run for a while.
I tried the cranking ordeal with my car as well....wasn't getting any spark. I tried replacing just the coil and that didn't work either. I had to replace both of them at the same time and viola! It started right up. This happened at the same time my catalytic converter clogged on me.