As the co-founder and CEO of EDGAR Online, I ran the company for thirteen years. For the vast majority of that time I was fully focused on the development and growth of the company, and firmly committed to remaining the CEO until I felt we’d achieved our vision. But after a very desirable acquirer backed out, my investors grew restless and pushed for a succession plan. Two months later, I was informed by the board that the succession plan had been accelerated and that our President would now be the CEO.

This sort of scenario happens far more often than either entrepreneurs or investors like to admit. Here’s how, when the time comes, you can be prepared:

Write Your Succession Plan

Whether your company is public or private, make sure you have a succession plan and that your interests are protected. Assume that your separation agreement will have a non-compete clause, and make sure you understand the terms of it. The non-compete should related to your company’s business specifically, and should not prohibit you from other types of ventures. Even if you live in California, where most non-competes are unenforceable, you don’t want to be heading to court just as you’re being ousted.

My non-compete restricted me from engaging in ventures in financial information, which I thought was reasonable. Since I had significant stock ownership in my company it would have been bizarre for me to try to complete with a company that I was hoping would help me realize a significant payout. In reality, broad or overly general non-competes rarely hold up in court, so it is in both parties' interests to be clear and fair.

Keep a Stiff Upper Lip

When the rug gets pulled out from under you, you have to somehow keep it together. You have to immediately come to terms with the decision and behave with extreme dignity that befits the legacy you plan to leave. Above all, as unpleasant as it can be, you need to understand that you had anticipated this and had participated in the succession process.

When it happened to me, I called a trusted advisor for input and sympathy. His first question was, “Did you cry?” I said, “No,” and he congratulated me, saying that is the thing people fear most about woman CEOs. (Great.) His next question was, "Are you going to stay on the board?" That’s an important question, because as long as you remain on the board, you are subject to regulations concerning purchases or sales of stock in the company. You’re also setting yourself up for some pretty uncomfortable meetings. I remained on the board until it became absolutely clear that my input would either be ignored or worse.

Get Out of Dodge--At Least Mentally

You need to get a new perspective immediately.  A fresh start will give you a sense of relief, which you will desperately need. I started a new venture, and we decided that New York was not the right place to do that. The conditions of my non-compete, plus my pride in EDGAR Online, made it impossible to engage my original founding team. We moved to Austin, Texas where we felt the environment would be more supportive.

Yes, You Could Do Better. Forget It.

Don’t stress over the problems of your former company. Maybe the stock is tanking and the new management is clearly clueless. You can’t do anything about it. Think about it this way: You want to concentrate on the new company, in which there are a myriad of things you actually can control.

Ask yourself this: Are you as passionate about your next innovation as you were about the previous one(s)? Are you driven to look forward, not back? Can you apply everything you learned at that earlier company to make your next one even more successful? The opportunity to feel the rush of a start-up is not limited to your first company. It’s the gift that keeps on giving.