I had a similar prob with my Vectra..... Engine light on, loss of power, turn it off then start it again and it would be ok for a short while. Does it do it when you load the engine; going uphill, flooring the accelerator etc? If yes then its most likely the air flow meter.
Simon
October 2005