when one door closes, another (one) opens
(when|as) a door (closes|shuts), a window opens

Definition & Meaning of "when one door closes, another (one) opens"in English

when one door closes, another (one) opens
01

used to suggest that when an opportunity is missed or a situation does not work out as planned, there will always be new opportunities or options that arise 

Examples
I was really disappointed when I didn't get the job I applied for, but I'm trying to stay positive and remember that when one door closes another opens. 
LanGeek
Download LanGeek app
langeek application

Download Mobile App

App Store