Turning magnetism on and off