
246 Or. 621 (1967)
427 P.2d 102
GOODMAN ET UX, Appellants, v. LADD ESTATE COMPANY, Respondent.
Supreme Court of Oregon.
Argued December 8, 1966.
Affirmed April 26, 1967.
*622 Denton G. Burdick, Jr., Portland, argued the cause for appellants. On the brief were Hutchinson, Schwab & Burdick.
James C. Maletis, Portland, argued the cause for respondent. On the brief were Cookingham and Maletis.
Before McALLISTER, Chief Justice, and SLOAN, GOODWIN, HOLMAN[*] and LUSK, Justices.
AFFIRMED.
LUSK, J.
Plaintiffs brought this suit to enjoin the defendant Ladd Estate Company, a Washington corporation, from enforcing a guaranty agreement executed by Westover Tower, Inc., a corporation, in favor of Ladd Estate. From a decree dismissing the suit plaintiffs appeal.
In 1961 the defendant Walter T. Liles[1] held all the common shares of Westover and he, Dr. Edmond F. Wheatley and Samuel H. Martin were its directors.
On September 8, 1961, Dr. Wheatley borrowed $10,000 from Citizens Bank of Oregon and gave his *623 promissory note therefor, which was endorsed by Ladd Estate. Contemporaneously with this transaction Liles, individually, and Westover, by Liles as president, and Martin, as secretary, executed an agreement in writing by which they unconditionally guaranteed Ladd Estate against loss arising out of the latter's endorsement of the Wheatley note to Citizens Bank. The agreement was also signed by Ladd Estate. It recited that it was made at the request of Liles and Westover and that Ladd Estate would not have guaranteed payment of the Wheatley note without the guarantee of Liles and Westover to Ladd Estate.
Wheatley defaulted on his note, Ladd Estate paid to Citizens Bank the amount owing thereon, $9,583.61, and demanded reimbursement from Westover. Upon the latter's rejection of the demand Ladd filed an action at law upon the guaranty agreement against Liles and Westover.
The plaintiffs Morton J. Goodman and Edith Goodman, husband and wife, came into the case in this manner: On September 27, 1963, plaintiffs purchased all the common shares of Westover from a receiver appointed by the Circuit Court for Multnomah County who was duly authorized to make such sale. At the time of such purchase, plaintiffs were fully aware of the guaranty agreement given by Westover and Liles to Ladd Estate. It is conceded that the guaranty agreement was ultra vires the corporation. Plaintiffs, as stockholders, brought this suit pursuant to the provisions of ORS 57.040, which reads in part:
"No act of a corporation and no conveyance or transfer of real or personal property to or by a corporation shall be invalid by reason of the fact that the corporation was without capacity or power to do such act or to make or receive such conveyance *624 or transfer, but such lack of capacity or power may be asserted:
"(1) In a proceeding by a shareholder against the corporation to enjoin the doing of any act or acts or the transfer of real or personal property by or to the corporation. If the unauthorized acts or transfer sought to be enjoined are being, or are to be, performed or made pursuant to any contract to which the corporation is a party, the court may, if all of the parties to the contract are parties to the proceeding and if it deems the same to be equitable, set aside and enjoin the performance of such contract, and in so doing may allow to the corporation or to the other parties to the contract, as the case may be, compensation for the loss or damage sustained by either of them which may result from the action of the court in setting aside and enjoining the performance of such contract, but anticipated profits to be derived from the performance of the contract shall not be awarded by the court as a loss or damage sustained."
1, 2. It will be noticed that the court may set aside and enjoin the performance of the ultra vires contract if it deems such a course equitable. Plaintiffs argue that to deny them the relief they seek would be "shocking," because Westover executed the guaranty agreement in order to enable one of its directors, Wheatley, to obtain a loan of money to be used for purposes entirely foreign to any corporate purpose. We see nothing shocking or even inequitable about it. The corporation was organized for the purposes, among others, to engage in the business of providing housing for rent or sale and to obtain contracts of mortgage insurance from the Federal Housing Commissioner, pursuant to the provisions of the National Housing Act, 12 USCA § 1701 et seq. Authorized capital stock comprised 30,100 shares of which 100 shares, having a par value *625 of $1 per share and designated preferred stock, were issued to the Commissioner, pursuant to § 1743 (b) (1), USCA, and 30,000 shares, having a par value of $1 per share and designated common stock, were issued to Liles. Voting rights of the shareholders were vested exclusively in the holders of the common stock. The guaranty agreement recites that, at the request of Liles and Westover, Ladd Estate guaranteed payment of the Wheatley note. Ladd Estate made good on its endorsement when Wheatley defaulted and now calls upon Westover to honor its obligation. The agent of the plaintiffs, who purchased the shares for them, testified that he considered the question whether the guaranty was a valid obligation of the corporation before making the purchase and concluded that it was not. The fact that he guessed wrong does not in any way enhance plaintiffs' claim to equitable consideration.
Neither would it be inequitable to enforce the agreement because of the purpose which the guaranty was intended to serve. Even before the enactment of ORS 57.040 a corporation might properly enter into a guaranty agreement in the legitimate furtherance of its business or purposes: Depot R. Syndicate v. Enterprise B. Co., 87 Or 560, 562, 170 P 294, 171 P 223, LRA 1918C 1001; 19 Am Jur 2d 493, Corporations § 1030; that the agreement does not further such purposes is what makes it ultra vires. But the statute says the agreement is enforceable even though ultra vires, and to accept the plaintiffs' argument would be to say that because it is ultra vires the agreement is inequitable and, therefore, unenforceable. This would effectually emasculate the statute.
3, 4. Moreover, plaintiffs are in no position to invoke the aid of a court of equity. Liles, the former holder of their shares  all the voting shares of Westover *626  induced Ladd Estate to endorse Wheatley's note by procuring Westover to execute the guaranty agreement. If a shareholder himself has participated in the ultra vires act he cannot thereafter attack it as ultra vires: 7 Fletcher, Cyc. of Corporations (perm ed, 1964 rev) 613, § 3453. This would seem to be emphatically so of a shareholder who exercises the entire voting power of the corporation. Plaintiffs, as purchasers of Liles' shares, are in no better position than he would have been to raise the question. McCampbell v. Fountain Head R. Co., 111 Tenn 55, 75, 77 SW 1070, 102 Am St Rep 731; 7 Fletcher, op. cit. 614, § 3456.
It should be added that no rights of creditors of Westover are involved and there is nothing to indicate that the security of any mortgage guaranteed by the Federal Housing Commissioner would be impaired by enforcement of the agreement here in question.
Other questions raised in the brief will be considered in the companion case entitled Ladd Estate Company v. Wheatley et al, 246 Or 627, 426 P2d 878.
We are of the opinion that plaintiffs are not entitled to equitable relief. The decree is affirmed.
NOTES
[*]  Did not participate in this decision.
[1]  Pursuant to stipulation, the suit was dismissed as to Liles and Westover. The stipulation provided that "this suit may proceed in the same manner as if the said Walter T. Liles and Westover Tower, Inc. were parties hereto."
