Abstract: We study the stability of the spectrum of the magnetic Schr\"odinger operator in the two-dimensional strip with Dirichlet boundary conditions. We show that in the presence of a suitable magnetic field the bottom of the spectrum will be stable against sufficiently small geometrical perturbations of the waveguide. The same result will be proved also for the waveguide with a Neumann ``window''.