
929 P.2d 1321 (1996)
The MINNELUSA COMPANY, a Florida corporation; and F.H. Gower, Jr., Petitioners,
v.
A.G. ANDRIKOPOULOS; George A. Seifert; and John E. Dunn and Marjorie O. Dunn, as trustees of the Dunn Trust, Respondents, and
Florida Marine Construction Inc., a Florida corporation, Intervenor and Respondent.
No. 95SC614.
Supreme Court of Colorado, En Banc.
December 23, 1996.
Rehearing Denied January 21, 1997.
Theodore M. Smith, Denver, for Petitioners.
*1322 Baker & Hostetler, James A. Clark, Kathryn A. Elzi, Denver, for Respondents A.G. Andrikopoulos, George A. Seifert, and John E. Dunn and Marjorie O. Dunn, as Trustees of the Dunn Trust.
No appearance on behalf of Intervenor and Respondent Florida Marine Construction Inc.
Chief Justice VOLLACK delivered the Opinion of the Court.
We granted certiorari to review the court of appeals decision in Andrikopoulos v. Minnelusa Co., 911 P.2d 663 (Colo.App.1995), to determine whether a corporation may use a Florida statute, which prohibits insolvent corporations from repurchasing their own shares, to release it from obligations contained in a stock repurchase agreement. The court of appeals held that neither the corporation nor one of its principal shareholders had standing to raise the statute as a defense. We affirm the court of appeals on different grounds.

I.
The Minnelusa Company (Minnelusa) is a Florida corporation that was formed to finance a speculative investment in a marina located in Fort Meyers, Florida. In 1989, Minnelusa encountered financial difficulties which led one of the corporation's major creditors to demand personal loan guarantees from each of Minnelusa's shareholders. When shareholders A.G. Andrikopoulos, George Seifert, and John and Marjorie Dunn (the plaintiffs) refused to give their personal guarantees, Minnelusa offered to buy out their shares.
On February 14, 1990, the plaintiffs and Minnelusa executed a stock repurchase agreement, wherein the plaintiffs agreed to surrender their stock into escrow in exchange for cash and promissory notes. These notes were secured with existing Minnelusa stock and were personally guaranteed by another Minnelusa shareholder, F.H. Gower, Jr. (Gower). The promissory notes required quarterly payments which would culminate in a balloon payment on January 1, 1995. Once this balloon payment was made, the plaintiffs' stock would be released from escrow to Minnelusa.
In January of 1993, Minnelusa ceased making payments on the promissory notes. Gower subsequently refused to honor his guarantee. The plaintiffs filed suit in Arapahoe County District Court[1] to collect the unpaid balance due under acceleration clauses contained in the promissory notes. In response, Minnelusa and Gower counterclaimed and asserted, as an affirmative defense, a Florida statute that prohibits insolvent corporations from repurchasing their own stock (the Florida stock repurchase statute). The counterclaim sought the return of the promissory notes and the recovery of all payments made under the stock repurchase agreement.
The plaintiffs moved for summary judgment, claiming that Minnelusa and Gower did not have standing to raise the Florida stock repurchase statute as a defense. The district court granted the plaintiffs' motion and awarded them the amount due under the promissory notes as well as their costs and attorney fees. The court of appeals affirmed.

II.
Throughout these proceedings, the parties and the courts below have referred to the issue in this case as whether Minnelusa has standing to assert the Florida stock repurchase statute as an affirmative defense. The term "standing," however, does not accurately describe the issue before us. As we explained in People ex rel. Simpson v. Highland Irrigation Co., 893 P.2d 122, 127 (Colo. 1995):

*1323 [O]nce the plaintiff has established standing and the defendants have been haled into court by the plaintiff, the only role for the defendants is to defend against the suit. The defendants' affirmative defense does not constitute an independent cause of action, but is a defensive claim only. Therefore, the rules for determining whether a plaintiff has standing are simply inapplicable to the defendants in this case.
Consistent with our reasoning in Simpson, we believe that Minnelusa, as the defendant, can assert the Florida stock repurchase statute as an affirmative defense. The issue is whether Minnelusa is an intended beneficiary of the Florida stock repurchase statute, and whether we should permit the corporation's use of the statute to void its obligations under the stock repurchase agreement.

III.

A.
Minnelusa and Gower claim that because Minnelusa was insolvent when it issued the promissory notes to the plaintiffs, the stock repurchase was illegal and void under the Florida stock repurchase statute.[2] Therefore, they argue that the obligations contained in the promissory notes are unenforceable.
Stock repurchase statutes are designed to protect creditors and minority stockholders from corporate mismanagement of assets. Naples Awning & Glass, Inc. v. Cirou, 358 So.2d 211, 213 (Fla.Dist.Ct.App.1978); Lewis v. Powell, 203 So.2d 504, 506 (Fla.Dist.Ct. App.1967); American Family Care, Inc. v. Irwin, 571 So.2d 1053, 1060 (Ala.1990); Hawkins v. Mall, Inc., 444 S.W.2d 369, 386 (Mo. 1969). Protecting creditors is necessary because stock repurchases can rearrange the corporation's capital structure "so as to alter the assumed basis upon which creditors have extended credit." Libco Corp. v. Leigh, 703 F.2d 996, 1001 (7th Cir.1983). Similarly, minority stockholders can suffer harm because stock repurchase agreements deplete the capital of the corporation. Irwin, 571 So.2d at 1060.
The plaintiffs cite passages from Hayes v. Belleair Development Co., 120 Fla. 326, 162 So. 698, 700 (1935), and Lewis, 203 So.2d at 506, for the proposition that Florida courts would not allow Minnelusa to assert the Florida stock repurchase statute. While these cases address stock repurchases generally, neither case is dispositive. In Hayes, the Florida Supreme Court explained in dicta that
[t]he weight of authority appears to be that, unless forbidden by charter or statute, a corporation is at liberty to purchase shares of its own stock. If such purchases are made when the corporation is insolvent, regardless of the rights of creditors and stockholders therein, we have found no case wherein a court, as between the stockholders making the sale and the corporation, has held them invalid and subject to avoidance at the suit of the corporation.
Hayes, 162 So. at 700. The Hayes court decided the case on different grounds. Id. In Lewis, the Florida District Court of Appeal reasoned:
As to the question of the right of the Corporation to purchase its stock only out of surplus ... we are of the opinion that the statute relative thereto is primarily to protect creditors and other stockholders from fraud and damages resulting therefrom. There is no evidence of fraud, nor of damage to creditors and there are no other stockholders to complain, so we conclude that this contention under the facts in this cause is without merit. *1324 Lewis, 203 So.2d at 506. This statement from Lewis, although it reaffirms the principle that stock repurchase statutes are designed to protect creditors and shareholders, does not directly address whether a corporation may use a stock repurchase statute to void its obligations under a stock repurchase agreement.
Minnelusa and Gower cite Naples, 358 So.2d 211, as support for their claim that Florida courts would hold that transactions which violate the Florida stock repurchase statute are illegal and void from the outset. In Naples, the Florida District Court of Appeal held that a stock repurchase agreement was void because the corporation had exceeded its corporate surplus when it executed the agreement. Naples, 358 So.2d at 214. However, in Naples, an assignee challenged the validity of a stock repurchase for the benefit of corporate creditors. Id. at 212 n. 1. Naples is therefore not controlling because the Florida stock repurchase statute was being asserted on behalf of its intended beneficiaries, whereas here we are being asked to apply the statute for the benefit of the corporation itself.
More directly on point are the majority of cases from other states that prohibit corporations from using stock repurchase statutes to void stock repurchase agreements. Irwin, 571 So.2d at 1060; Rainford v. Rytting, 22 Utah 2d 252, 451 P.2d 769, 771 n. 5 (1969); LaVoy Supply Co. v. Young, 84 Idaho 120, 369 P.2d 45, 49 (1962); Triumph Smokes, Inc. v. Sarlo, 482 S.W.2d 696, 698 (Tex.Civ. App.1972). Some of these courts treat corporate violations of stock repurchase statutes as unauthorized, or ultra vires, corporate acts. James v. J.F.K. Carwash, Inc. 275 Ark. 141, 628 S.W.2d 299, 300-01 (1982); Triumph Smokes, 482 S.W.2d at 698. Others refuse to allow corporations to assert stock repurchase statutes as a defense on estoppel grounds. See Irwin, 571 So.2d at 1060.
A minority of state appellate courts have held that stock repurchase agreements which violate statutory prohibitions are illegal and void, and refuse to enforce the obligations contained therein. McGinley v. Massey, 71 Md.App. 352, 525 A.2d 1076, 1078-80 (1987); Field v. Haupert, 58 Or.App. 117, 647 P.2d 952, 954 (1982); American Heritage Inv. Corp. v. Illinois Nat'l Bank, 68 Ill.App.3d 762, 25 Ill.Dec. 431, 436, 386 N.E.2d 905, 910 (1979). However, we find the following language in a case criticizing the minority view to be more enlightened:
The Court has not, in fact, adopted such a rigid rule that any contract made in violation of any statute is unenforceable. What it has done, although sometimes fleetingly, is to examine the statute at issue and the public policy behind it in an attempt to discern whether the legislature intended for contracts made in violation of the statute to be void or unenforceable. Other Maryland cases have more clearly expressed this notion.
Springlake Corp. v. Symmarron Ltd. Partnership, 81 Md.App. 694, 569 A.2d 715, 718 (1990).
We agree with the majority view that the validity of a corporate stock repurchase may be attacked only by persons who are injured or prejudiced thereby and not by the corporation itself. See Triumph Smokes, 482 S.W.2d at 698. Allowing corporations to void these transactions through the application of a statute designed to protect creditors and minority shareholders would, in effect, sanction corporate development of improper repurchasing schemes. See Irwin, 571 So.2d at 1060. Such a result is a misapplication of the statute and circumvents its intended purpose. For this reason, we hold that Minnelusa may not use the Florida stock repurchase statute to void its obligations under the stock repurchase agreement.

B.
Similarly, Gower raises the Florida stock repurchase statute as a defense to his obligations under the promissory notes. A shareholder who is fully aware of, and consents to, a questionable transaction may not *1325 thereafter attack that transaction by requesting that it be declared illegal. Libco Corp., 703 F.2d at 1001-02; Irwin, 571 So.2d at 1060; Hawkins, 444 S.W.2d at 387; see also Swafford v. Berry, 152 Colo. 493, 499, 382 P.2d 999, 1002 (1963) ("a shareholder who, with knowledge of the material facts, has consented or acquiesced in the transaction of which he complains ordinarily cannot attack the transaction on behalf of the corporation.").
Although Gower is a Minnelusa shareholder, the court of appeals correctly noted that not only was Gower aware of the stock repurchase agreement, but he also personally guaranteed promissory notes to effectuate the transaction he now seeks to invalidate. Andrikopoulos, 911 P.2d at 666. Because Gower is not an intended beneficiary of the Florida stock repurchase statute, we hold that Gower may not use the Florida stock repurchase statute to relieve him of his personal guarantee on the promissory notes.[3]

IV.
The judgment of the court of appeals is affirmed on different grounds.
NOTES
[1]  A clause in the promissory notes provides:

This Note is made under and governed by the laws of the State of Colorado. The place of venue for any action under the terms of this Note shall be Arapahoe County, Colorado District Court.
The stock repurchase agreement contains a similar clause.
[2]  We need not undertake a lengthy conflict of laws analysis to determine whether Colorado or Florida law should be applied to this cause of action. In this case, both parties have proceeded on the assumption that the Florida stock repurchase statute is controlling. Additionally, Minnelusa was incorporated in Florida and is subject to the laws of that state governing corporations. See Fla. Stat. ch. 607.1701 (1992). We therefore believe it is necessary for us to apply Florida law to determine whether Minnelusa may use the Florida stock repurchase statute to void its obligations under the stock repurchase agreement.
[3]  Gower also contends that because the stock repurchase agreement was illegal, his guarantee of the plaintiffs' promissory notes is unenforceable. In support of this claim, he seizes upon our language in Alzado v. Blinder, Robinson & Co., 752 P.2d 544 (Colo.1988), where we explained that, "[i]n general, a guaranty agreement is not enforceable if the underlying obligation upon which it is based is void." Alzado, 752 P.2d at 549. As explained above, Minnelusa and Gower may not use the Florida stock repurchase statute to void their obligations under the stock repurchase agreement. This precludes us from analyzing the alleged illegality of the stock repurchase agreement and the effect our statement in Alzado has upon Gower's guarantee.
