
409 So.2d 773 (1981)
John E. FORRESTER, Jr.
v.
Emolyn W. PUTMAN.
80-6.
Supreme Court of Alabama.
November 25, 1981.
As Modified on Denial of Rehearing February 5, 1982.
*774 David R. Donaldson of Gorham & Donaldson, Birmingham, for appellant.
Jack E. Held and F. Timothy McAbee of Sirote, Permutt, Friend, Friedman, Held & Apolinsky, Birmingham, for appellee.
ADAMS, Justice.
Mrs. Frances Forrester died on September 23, 1977, survived by her son John Forrester, Jr., (appellant) and her sister, Emolyn Putman. Mrs. Putman's husband, Oather Putman, filed in Shelby County Probate Court a will which he had written for Mrs. Forrester, as her attorney, dated August 18, 1977. John contested this will in Shelby Probate Court, but the petition for probate was dismissed without prejudice on April 3, 1978, by stipulation. John filed an action in Shelby Circuit Court on April 12, 1978, challenging joint ownership with right of survivorship between Mrs. Forrester and Mrs. Putman of certain securities for which John asserted Mrs. Forrester had paid the whole consideration. Thereafter, on May 16, 1978, the Putmans' attorney sent a letter to John's attorney, purporting to withdraw the stipulation for dismissal "[i]n light of the lawsuit which was recently filed...."
On April 24, 1978, John filed in Shelby Probate Court for probate of a will executed by Mrs. Forrester on March 5, 1974. The Judge of Probate admitted this will to probate on May 24, 1978, and granted letters testamentary to John. Mrs. Putman filed an action in Shelby Circuit Court on July 6, 1978, contesting the 1974 will and John's letters testamentary, alleging that the 1974 will had been revoked by the 1977 will. This contest was consolidated with John's action to set aside the transfer of interest in the securities; in this aspect of the case, the circuit court set aside the transfer of an interest to Mrs. Putman based upon a finding of undue influence and this portion of the order was not appealed.
The facts of the case showed that prior to the death of her husband, John Forrester, Sr., in 1975, Mrs. Forrester had emotional problems and consumed excessive amounts of alcohol and drugs. The testimony conflicted over her condition prior to and at the time of execution of the 1977 will; there was credible evidence both for and against her capacity. In addition to capacity, John raised undue influence as a challenge to the 1977 will. The court found that the presumption of undue influence, raised by the confidential relationship, by the Putmans' role in execution of the will, and by the fact that her attorney was her brother-in-law and an indirect beneficiary, was not overcome with regard to the stock transaction, but was overcome with regard to the will execution. The decree bases this finding on the lack of evidence relating to independent choice in the former instance and the plethora thereof (which also went to the issue of capacity) in the latter.
The trial began on May 21, 1980; after the examination of John's first witness, the court made the following statement:
For the record, in reviewing the file [in Mrs. Putman's will contest action], I see that our pleadings were technically deficient. By agreement, however, and in accordance with the evidence to be presented, the 1977 will, which is mentioned in the Plaintiff's Complaint, is offered *775 at this time for probate and Defendant objects to the probate of that will on the same grounds he has set out for relief in [his action to set aside the inver vivos transfers].
The Court's final order decreed the 1977 will to be valid, but made no mention of the 1974 will which was the subject of Mrs. Putman's complaint. In ruling on John's motion for a new trial, the court stated:
Never was there any procedural objection until after Judgment was entered in this case. Further, the issues involved in this case were stated to the Court by both parties and were, therefore, clearly understood. Two wills, including the will which this Court upheld as valid, had been admitted to Probate. No jury demand was ever made in this case. Motion denied.
The circuit court's treatment of the 1977 will reflects misapprehension as to the status of this will. The purported unilateral withdrawal of the stipulation for dismissal is of dubious effect; even if it did serve to revive the probate proceeding, there is no support in the record for the trial court's observation that the 1977 will was admitted to probate. There was neither a transfer of a contest to the circuit court according to Code 1975, § 43-1-78, nor a circuit court contest of a will admitted to probate according to Code 1975, § 43-1-79. A circuit court's jurisdiction over a will contest is statutory and limited. Nottage v. Jones, 388 So.2d 923 (Ala.1980); Cagle v. Reeves, 353 So.2d 787 (Ala.1977). Therefore, the circuit court had jurisdiction over the 1977 will only to the extent of determining whether it revoked the 1974 will. Although the ruling on the motion for new trial points out that no procedural objection was made until after trial, lack of subject matter jurisdiction can be raised at any time. Rule 12(h)(3), A.R.C.P.
In view of our holding that the circuit court's decision on the validity of the 1977 will was not couched in terms of its jurisdiction over the 1974 will contest, there is some question as to the effect of its findings of testamentary capacity and lack of undue influence should an application for probate and a contest thereto be filed subsequent to this decision. In determining whether the 1977 will revoked the 1974 will the circuit court had to consider whether the 1977 will met the following requirements:
(1) The will must be in writing; (2) it must be signed by the testator, or someone for him; (3) it must be attested by at least two witnesses; and (4) the witnesses must subscribe their names in the presence of the testator.
Allan v. Allan, 353 So.2d 1157 at 1157 (Ala. 1977); Code 1975, § 43-1-33.
John's proper response to the claim of revocation, therefore, would have been to challenge the 1977 will on one of these four grounds. Instead, he challenged the 1977 will on the grounds of capacity and undue influence. Because he raised these issues, which were exhaustively tried and ably decided, he will be estopped from raising them again should the 1977 will be properly filed for probate and should he decide to contest it. We are mindful of the observation in Kelley v. Sutliff, 262 Ala. 622, 80 So.2d 636 (1955), that in this situation the probate of the 1977 will is a matter "which must be first addressed to the probate court, and this, we think, without encroachment upon its primary jurisdiction." Id., at 628, 80 So.2d 636. Nevertheless, we believe that the circumstances described above properly preclude John from raising these issues before the probate court.
John raises the argument here that he was denied the right to trial by jury. However, we note that he sought a trial by jury in his action to set aside the inter vivos transfers, but not in his defense to Mrs. Putman's contest of the 1974 will. Because his demand in the former case was properly denied as untimely and because in the latter case he raised the issue for which he now claims the right to trial by jury, we hold he has waived the right to make this demand.
The trial court's decision that the 1977 will is valid only impliedly holds that the 1974 will was revoked. This decision presupposes *776 that the 1977 will was properly executed, signed, and witnessed, so we remand the case only for the circuit court to amend its decree to explicitly hold the 1974 will is revoked and to clarify that the 1977 will has not been admitted to probate.
REVERSED AND REMANDED WITH DIRECTIONS.
TORBERT, C. J., and FAULKNER, ALMON and EMBRY, JJ., concur.

On Application for Rehearing
ADAMS, Justice.
OPINION MODIFIED; APPLICATION FOR REHEARING OVERRULED.
TORBERT, C. J., and FAULKNER, ALMON and EMBRY, JJ., concur.
