cutting out while driving on 1998 Honda CR-V

With no consistency in speed or situation, my 1998 CRV is periodically shuts off while driving; have tried dry gas; jiggled key to determine is an ignition problem; it has good battery. This happens whether at 40 mph or 10 mph - getting scary; any ideas appreciated, my mechanic is a bit stumped.

Asked by for the 1998 Honda CR-V
Does you CR-V start right back up after it stalls or do you need to wait a short time before it restarts? Stalling issues where the vehicle starts right back up can be VERY difficult to diagnose. I can take a lot of trial and error to find the cause. If the engine does not start right back up at least there is a chance to perform some quick checks to try and isolate the problem - the problem there is that your mechanic will need to be there when the car won't start. There is a possibility that a fault code is stored in the engine computer when the stall occurs. Make sure your mechanic has checked the system for fault codes. Maybe someone else out there has been through this with their CR-V - anyone?
3 more answers , 1 more comment
Had the same problem... recall of ignition switch.
I had the same problem with my 1998 Honda crv, there was a recall on the ignition. I was never notified about it.
After chatting with a couple of mechanics, and hints from other online sources, we guessed it was likely the ignition switch. However, first there was a battery check and a couple of other minor things that needed to be ruled out. The replacement and labor was well under $400. Thanks for the responses: Illinois and Russ
My 98 crv had the same problem at 178,00 miles. I replaced the ignition coil and control module which are mounted together under the distributor cap. not sure which it was as either can cause a loss of spark when hot. The car will restart when they cool down. The coil is about $80 and the module is about $66 at autozone.