The effect of horizontal periodic oscillations on the interfacial instability of two immiscible, viscous fluids of different densities, confined in a vertical Hele-Shaw cell, is investigated. An inviscid linear stability analysis of the viscous basic flow leads to the periodic Mathieu oscillator describing the evolution of interfacial amplitude. We examine mainly the effect of the periodic oscillations and the influence of the viscosity on the stability of the interface. The results show that a decrease in the viscosity contrast has a stabilizing effect on the Kelvin-Helmholtz instability, which is displaced towards the long-wave region. The effects of other parameters such as the frequency number and the Weber number are also examined.