Did you test power to the switch to make sure the supply circuit isn't cutting out? Could be a ignition switch concern, admittedly unlikely, but still rule it out.
When first switched on does the dimmer work correctly?