"When God shuts one door," Don Quixote says in The Man of La Mancha, "He opens another." Or, some have said, "When God closes a door, He opens a window." That's not actually in the Bible although the book of Proverbs says that when a person lives his life in alignment with God's ways, God will direct His path (Proverbs 3:5-6).