We observed the optical counterparts of X-ray sources in the old open clusters NGC 752 and NGC 6940 to search for the origin of the X-rays. The photometric variability reported earlier for the blue straggler H 209 is not confirmed by our light curves, nor is an indication for variability seen in the spectra; thus its X-rays remain unexplained. The X-rays of VR 111 and VR 114 are likely not a result of magnetic activity as these stars lack strong Ca II H&K emission, while in VR 108 the level of activity could be enhanced. The short-period binary H 313 is a photometric variable; this supports the interpretation that it is a magnetically active binary. From the detection of the Li I 6707.8 Å line, we classify the giant in VR 84 as a first-ascent giant; this leaves its circular orbit unexplained. As a side-result we report the detection of Li I 6707.8 Å in the spectrum of the giant H 3 and the absence of this line in the spectrum of the giant H 11; this classifies H 3 as a first-ascent giant and H 11 as a core-helium-burning clump star, and confirms the faint extension of the red-giant clump in NGC 752. Based on observations made with the Jacobus Kapteyn Telescope and the William Herschel Telescope operated on the island of La Palma by the Isaac Newton Group in the Spanish Observatorio del Roque de los Muchachos of the Instituto de Astrofisica de Canarias.