The answer to this question depends entirely on what has transpired up to this time and your state's law.  In Florida, a personal representative (executor) cannot remain as PR and challenge the will they are appointed to uphold and administer.  Whether the executor can withdraw as executor and then contest the will depends on your state law.  If you stand to lose if the executor succeeds, I suggest you consult a probate litigation attorney immediately.