Anomalous electron transport is determined by turbulence, which in turn is affected by magnetic shear. A novel application of electron cyclotron current drive (ECCD), aiming at localized shear modulation, has been applied on the TCV tokamak for experiments on shear-dependent electron transport. Pairs of EC beams, absorbed at the same radius, with one oriented for co- and the other for counter-injection, are modulated out of phase in order to force a local modulation of current-density at constant input power. Off-axis deposition (rho(dep) = 0.24) is performed to avoid the central region, where the low heat flux would make transport analysis difficult. In addition some sawteeth control is achieved in this way. A significant impact on local shear is achieved with I-ECCD approximate to 0. 1 I-OH, even when the modulation period is much shorter than the current diffusion time across the whole plasma radius. The main result is that although source (heat and particle) terms are constant, both electron density and temperature are modulated during alternated ECCD. Once equilibrium effects are taken into account for appropriate mapping of Thomson scattering measurements onto flux coordinates, modulation of T-e and electron pressure, peaked on-axis, is confirmed at all radii internal to EC deposition. The best confinement occurs for co-injection, in which case a local decrease (approximate to 55%) in the magnetic shear causes a decrease in the electron thermal diffusivity of a similar amount (approximate to 65%).