Examples of closed doors that led to open windows in the Bible include Joseph being sold into slavery by his brothers, only to become a powerful ruler in Egypt, and Paul being imprisoned for preaching the gospel, which led to him writing many of the New Testament letters. In both cases, God used difficult circumstances to bring about greater good.