On resonances in transversally vibrating strings induced by an external force and a time-dependent coefficient in a Robin boundary condition