Why has my car stopped starting unless I press on the gas. on 2003 Pontiac Grand Prix

It tries to start, but will not continue to run. I've replaced the fuel filter, spark plugs, and checked for vacuum leaks. In October, I replaced the throttle position sensor, idle speed control, thermostat, water pump and computer. This has happened off and on for a couple months now, but I am not getting any codes. I was told it could be the camshaft sensor. Please help!!! Thank you in advanced!!

Asked by for the 2003 Pontiac Grand Prix