The formalism of the continuum random-phase approximation theory which treats, without approximations, the continuum part of the single-particle spectrum, is extended to describe chargeexchange excitations. Our approach is self-consistent, meaning that we use a unique, finite-range, interaction in the Hartree-Fock calculations which generate the single-particle basis and in the continuum random-phase approximation which describes the excitation. We study excitations induced by the Fermi, Gamow-Teller and spin-dipole operators in doubly magic nuclei by using four Gognylike finite-range interactions, two of them containing tensor forces. We focus our attention on the importance of the correct treatment of the continuum configuration space and on the effects of the tensor terms of the force.