when one door closes, another opens

From Wiktionary, the free dictionary