Dome light

I have a 1996 Toyota corolla base model,my dome light stopped working a bout a year ago,I clean the contacts and bulb with sand paper,light would then work for about 2 weeks now When I clean contacts light will only work for a few hours. Have tryed new bulbs many times dos not make any difference Help dont know what to do. Thanks everyone.

intermittent ground perhaps. on a car this age that is probable and your work at the bulb contacts already leans toward that theory.

One or more of the mounting screws may ground to the body.
loosen the screws and re-tighten sharpening up the contact to ground.

If ground is only in the harness, un-plug and re-plug several times to sharpen the contacts there.
Also follow that harnes to any other plugs and do the same.