When one door shuts, another opens:

An optimistic view on life, in which a refusal or failure is always followed by another opportunity.