Every single time I saw this same problem, either monitor cable was not fully inserted into VGA connector, or too much dust buildup was preventing proper electrical connection. In each and every case, cleaning both VGA port and cable plug with a brush, followed by spraying an appropriate contact-cleaning solution, and fixing the cable the way it's supposed to be done solved the problem.
Of course, if one of the wires inside your cable is broken, there's nothing you can do to repair it without damaging the EMI shieldind. If that's the case, you'll need to have the cable replaced.