Exhibit 10.24

SIXTH AMENDMENT TO CREDIT AGREEMENT

THIS SIXTH AMENDMENT TO CREDIT AGREEMENT (this “Amendment”) is dated as of and
effective as of this 9th day of November, 2006, by and between TREX COMPANY,
INC., a Delaware corporation (sometimes hereinafter referred to herein as “Trex
Inc.”), and BRANCH BANKING AND TRUST COMPANY OF VIRGINIA, a Virginia state
banking corporation (hereinafter referred to herein as the “Bank”).

Trex Inc., TREX Company, LLC, a Delaware limited liability company (“TREX LLC”),
and the Bank are the original parties to that certain Credit Agreement dated as
of June 19, 2002, as amended by a First Amendment to Credit Agreement dated as
of August 29, 2003, as further amended by a Second Amendment to Credit Agreement
dated as of September 30, 2004, as further amended by a Third Amendment to
Credit Agreement dated as of March 31, 2005, as further amended by a Fourth
Amendment to Credit Agreement dated as of July 25, 2005, as further amended by a
Fifth Amendment to Credit Agreement dated as of December 31, 2005 (as so amended
and as it may hereafter be amended, restated, supplemented, replaced or
otherwise modified from time to time, the “Credit Agreement”). Subject to the
terms and conditions contained in the Credit Agreement, the Bank agreed to
extend to Trex Inc. and TREX LLC (i) a revolving credit facility, with a letter
of credit subfacility, in the aggregate amount of $30,000,000 for working
capital financing of Trex Inc.’s and TREX LLC’s accounts receivable and
inventory, to purchase new equipment and/or for other general corporate purposes
of Trex Inc. and TREX LLC, (ii) a term loan facility in the amount of
$9,570,079.88 to refinance the Winchester Property (as defined in the Credit
Agreement), and (iii) a term loan facility in the amount of $3,029,920.12 to
finance existing improvements to the Winchester Property. Effective December 31,
2002, TREX LLC merged with and into Trex Inc., with Trex Inc. being the
surviving entity. As a result of such merger, Trex Inc. is the sole borrower
under the Credit Agreement and shall hereinafter sometimes be referred to in
this Amendment as the “Borrower.”

The Borrower has requested that the Bank increase the aggregate amount of the
revolving credit facility for a specified period of time and make certain other
modifications to the Credit Agreement, and the Bank is willing to do so upon the
terms and conditions contained herein.

Accordingly, the Borrower and the Bank hereby agree as follows:

1. Capitalized terms used in this Amendment and not otherwise defined herein
shall have the meanings assigned thereto in the Credit Agreement.

2. The first paragraph of Section 2.01(c)ii. of the Credit Agreement is hereby
deleted in its entirety and the following paragraph is substituted in its place:

 

  ii.

“Eligible Account” means (1) for the period November 9, 2006 to and including
June 30, 2007, an account receivable which is (i) for each account receivable
created during the period January 1, 2007 to and including January 31, 2007,
(A) not more than 150 days from the date of the original invoice and (B) not
more than 90 days

--------------------------------------------------------------------------------

 

from the due date of the original invoice that arises in the ordinary course of
the Borrower’s business, is on normal and customary terms in the Borrower’s
business (which customary terms include customer incentives), and meets the
eligibility requirements set forth in items 1. to and including 12. immediately
following this clause ii, (ii) for each account receivable created during the
period February 1, 2007 to and including February 28, 2007, (A) not more than
120 days from the date of the original invoice and (B) not more than 60 days
from the due date of the original invoice that arises in the ordinary course of
the Borrower’s business, is on normal and customary terms in the Borrower’s
business (which customary terms include customer incentives), and meets the
eligibility requirements set forth in items 1. to and including 12. immediately
following this clause ii, and (iii) for each account receivable created at any
other time during the period November 9, 2006 to and including June 30, 2007,
(A) not more than 90 days from the date of the original invoice and (B) not more
than 45 days from the due date of the original invoice that arises in the
ordinary course of the Borrower’s business, is on normal and customary terms in
the Borrower’s business (which customary terms include customer incentives), and
meets the eligibility requirements set forth in items 1. to and including 12.
immediately following this clause ii; and (2) for any period other than
November 9, 2006 to and including June 30, 2007, an account receivable which is
(i) (A) for the period April 1 to and including November 30 in any year, not
more than 60 days from the date of the original invoice and (B) for the period
December 1 of any year to and including March 31 of the immediately following
year, not more than 90 days from the date of the original invoice and (ii) at
all times, not more than 45 days from the due date of the original invoice that
arises in the ordinary course of the Borrower’s business, is on normal and
customary terms in the Borrower’s business (which customary terms include
customer incentives), and meets the eligibility requirements set forth in items
1. to and including 12. immediately following this clause ii:

3. Section 6.01(c) of the Credit Agreement is hereby deleted in its entirety and
the following Section is substituted in its place:

(c) Monthly Financial Statements. As soon as available and in any event within
15 Business Days after (i) the end of each month: (A) a Borrowing Base
Certificate and (B) a financial report of accounts receivable (including an
aging of accounts receivable in an initial increment of 30 days, a second
increment of 31-45 days, a third increment of 46-60 days and in 30-day
increments thereafter), inventory and production; and (ii) the end of the first
two months of each fiscal quarter, an internally

 

2

--------------------------------------------------------------------------------

prepared consolidated and, with respect to Material Subsidiaries, consolidating
balance sheet of the Borrower and its Consolidated Subsidiaries and the related
consolidated and, with respect to Material Subsidiaries, consolidating
statements of income and cash flows of the Borrower and its Consolidated
Subsidiaries for such month all in reasonable detail and satisfactory in form to
the Bank and all certified (subject to normal year-end audit adjustments) as to
fairness of presentation, GAAP and consistency by the chief financial officer or
chief accounting officer of the Borrower.

4. The second sentence of Section 6.06 of the Credit Agreement is hereby deleted
in its entirety and the following two sentences are substituted in its place:

The Borrower shall pay to the Bank a borrowing base review fee in the amount of
$500 on or before the first day of each calendar month commencing on December 1,
2006 and continuing to and including June 1, 2007. In addition, the costs of all
field audits, inspections and appraisals will be borne by the Borrower;
provided, however, that unless an Event of Default has occurred and is
continuing, the Borrower shall only be responsible for the payment of one such
audit, inspection or appraisal during each calendar year.

5. Section 6.07 of the Credit Agreement is hereby amended by inserting the
following two (2) sentences at the end of that Section:

The Borrower hereby represents and warrants to the Bank that, as of November 9,
2006, neither the Borrower nor any of its Subsidiaries, nor any Corporate
Assets, is subject to any agreement, judgment, injunction, order, decree or
other instrument that prohibits, restricts or in any way limits the Borrower or
any of its Subsidiaries from creating, incurring, assuming or suffering to exist
any Lien upon or with respect to any Corporate Assets in favor of any creditor
except for (i) the Loan Documents, (ii) agreements or documents creating or
establishing Permitted Liens, (iii) the Note Agreement as amended as of
November 9, 2006 and (iv) the Reimbursement and Credit Agreement dated as of
December 1, 2004 by and between the Borrower, JPMorgan Chase Bank, N.A., as
issuing bank, and JPMorgan Chase Bank, N.A., as administrative agent, as amended
as of November 9, 2006 (as so amended, the “Chase Credit Agreement”). The
Borrower hereby covenants and agrees that neither it nor any of its
Subsidiaries, nor any of the Corporate Assets, will become subject to any
agreement, judgment, injunction, order, decree or other instrument that
prohibits, restricts or in any way limits the Borrower or any of its
Subsidiaries from creating, incurring, assuming or suffering to exist any Lien
upon or with respect to any of the Corporate Assets in favor of any creditor
except for (i) the Loan Documents, (ii) agreements or documents creating or
establishing Permitted Liens, (iii) the Note Agreement as amended as of
November 9, 2006 and (iv) the Chase Credit Agreement.

 

3

--------------------------------------------------------------------------------

6. Section 6.11 of the Credit Agreement is hereby deleted in its entirety and
the following Section is substituted in its place:

Section 6.11. Total Consolidated Debt to Consolidated EBITDA Ratio. The Borrower
will not, as of the end of any fiscal quarter, permit the ratio of the Total
Consolidated Debt to Consolidated EBITDA (the “Total Consolidated Debt to
Consolidated EBITDA Ratio”) for the four-quarter period ended as of the end of
such fiscal quarter to exceed the following amounts for the following periods:
(i) 3.75 to 1 for the period commencing on October 1, 2006 to and including
December 31, 2006, (ii) 3.25 to 1 for the period commencing on January 1, 2007
to and including March 31, 2007 and (iii) 2.50 to 1 thereafter.

7. The definition of the term, “Inventory Sublimit,” contained in the
Definitions Appendix to the Credit Agreement is hereby deleted in its entirety
and the following definition is substituted in its place:

“Inventory Sublimit” means (a) $10,000,000 for the period commencing on May 1,
2002 and continuing to and including September 30, 2002, (b) $12,000,000 for the
period commencing on May 1, 2003 and continuing to and including September 30,
2003, (c) $14,000,000 for the period commencing on May 1, 2004 and continuing to
and including September 30, 2004, (d) $16,000,000 for the period commencing on
May 1, 2005 and continuing to and including September 30, 2005, (e) $16,000,000
for the period commencing on May 1, 2006 and continuing to and including
September 30, 2006, (f) for any period occurring between May 1, 2002 to and
including November 8, 2006 not identified in clauses (a) to and including
(e) above, the Revolving Commitment, (g) $50,000,000 for the period commencing
on November 9, 2006 and continuing to and including June 30, 2007, and
(h) $15,000,000 for the period commencing on July 1, 2007 and at all times
thereafter.

8. The definition of the term, “Revolving Commitment,” contained in the
Definitions Appendix to the Credit Agreement is hereby deleted in its entirety
and the following definition is substituted in its place:

“Revolving Commitment” means (i) for the period June 19, 2002 to and including
December 31, 2005, $20,000,000.00 or such lesser amount to which it is reduced
pursuant to Section 2.07, (ii) for the period January 1, 2006 to and including
June 30, 2006, $30,000,000.00 or such lesser amount to which it is reduced
pursuant to Section 2.07, (iii) for the period July 1, 2006 to and including
November 8, 2006, $20,000,000.00 or such lesser amount to which it is reduced
pursuant to Section 2.07, (iv) for the period November 9, 2006 to and including
June 30, 2007, $70,000,000.00 or such lesser amount to which it is reduced
pursuant to Section 2.07 and (v) for the period July 1, 2007 and at all times
thereafter, $20,000,000 or such lesser amount to which it is reduced pursuant to
Section 2.07.

 

4

--------------------------------------------------------------------------------

9. Exhibit I-3 to the Credit Agreement is hereby deleted in its entirety and a
new Exhibit, which is attached to this Amendment and labeled Exhibit I-4, is
substituted in its place.

10. The Borrower hereby represents and warrants to the Bank (which
representations and warranties shall survive the execution and delivery of this
Amendment) that:

(a) It is in compliance with all of the terms, covenants and conditions of the
Credit Agreement, as amended by this Amendment, and each of the other Loan
Documents.

(b) There exists no Default or Event of Default under the Credit Agreement, as
amended by this Amendment, and no event has occurred or condition exists which,
with the giving of notice or lapse of time, or both, would constitute such a
Default or Event of Default.

(c) The representations and warranties contained in Article V of the Credit
Agreement are, except to the extent that they relate solely to an earlier date
or except to the extent that they relate solely to TREX LLC, true in all
material respects with the same effect as though such representations and
warranties had been made on the date of this Amendment.

(d) The execution, delivery and performance by the Borrower of this Amendment
and the new promissory note (attached hereto as Exhibit I-4) are within its
corporate powers, have been duly authorized by all necessary corporate action,
require no action by or in respect of, or filing with, any governmental body,
agency or official and do not contravene or constitute (with or without the
giving of notice or lapse of time or both) a default under any provision of
applicable law or of the organizational documents of the Borrower or any
Subsidiary or of any agreement, judgment, injunction, order, decree or other
instrument binding upon or affecting the Borrower or any Subsidiary or result in
the creation or imposition of any Lien on any asset of the Borrower or any of
its Subsidiaries.

(e) This Amendment and the promissory note described in paragraph 10(d) of this
Amendment constitute the valid and binding agreements of the Borrower,
enforceable against the Borrower in accordance with their respective terms,
except as such enforceability may be limited by bankruptcy, insolvency or
similar laws affecting creditors’ rights generally and by equitable principles
of general applicability (regardless of whether such enforceability is
considered in a proceeding in equity or at law).

(f) Except as set forth on Schedule 5.05 to the Credit Agreement, there is no
material action, suit, proceeding or investigation pending against, or to the
knowledge of the Borrower threatened against, contemplated or affecting, the
Borrower or any of its Subsidiaries before any court, arbitrator or governmental
body, agency or official which has, or could reasonably be expected to have,
individually or in the aggregate, a Material Adverse Effect, or which in any
manner draws into question the validity or

 

5

--------------------------------------------------------------------------------

enforceability of this Amendment, the promissory note described in paragraph
10(d) of this Amendment or any of the Loan Documents, and there is no basis
known to the Borrower or any of its Subsidiaries for any such action, suit,
proceeding or investigation.

11. The Bank’s agreement to enter into this Amendment is subject to the
following conditions precedent:

(a) The Borrower shall have executed and delivered to the Bank this Amendment
and the promissory note described in paragraph 10(d) of this Amendment in the
form of Exhibit I-4 attached hereto with the blanks therein appropriately
completed.

(b) The Borrower shall have executed and delivered, or caused to be executed and
delivered, to the Bank such other and further documents, certificates, opinions
and other papers as the Bank shall reasonably request; and the Borrower shall
have paid all fees due to the Bank.

(c) The Bank shall have received a favorable opinion of counsel to the Borrower
addressed to the Bank, dated as of the date hereof and satisfactory in form and
substance to the Bank, as to the due authorization, execution, delivery and
enforceability of this Amendment, the promissory note described in paragraph
10(d) of this Amendment, and such other matters as the Bank shall request.

(d) The Borrower shall have paid to the Bank in immediately available funds a
modification fee in the amount of $50,000, which fee shall be deemed fully
earned and non-refundable once paid.

12. Except as expressly amended hereby, the terms of the Credit Agreement shall
remain in full force and effect in all respects, and the Borrower hereby
reaffirms its obligations under the Credit Agreement, as amended by this
Amendment, and each of the other Loan Documents. The Borrower hereby waives any
claim, cause of action, defense, counterclaim, setoff or recoupment of any kind
or nature that it may assert against the Bank arising from or in connection with
the Credit Agreement, as amended by this Amendment, any of the Loan Documents,
or the transactions contemplated thereby or hereby that exist on the date hereof
or arise from facts or actions occurring prior hereto or on the date hereof.
Nothing contained in this Amendment shall be construed to constitute a novation
with respect to the obligations described in the Credit Agreement.

13. All references to the Credit Agreement in any of the Loan Documents, or any
other documents or instruments that refer to the Credit Agreement, shall be
deemed to be references to the Credit Agreement as amended by this Amendment.

14 This Amendment and the promissory note described in paragraph 10(d) of this
Amendment shall be construed in accordance with and governed by the laws of the
Commonwealth of Virginia.

 

6

--------------------------------------------------------------------------------

15. Any Dispute arising out of or related to this Amendment, the promissory note
described in paragraph 10(d) of this Amendment or any of the Loan Documents
shall be resolved by binding arbitration as provided in Section 9.07 of the
Credit Agreement. TO THE FULLEST EXTENT PERMITTED BY LAW, THE PARTIES HERETO
HEREBY IRREVOCABLY WAIVE THEIR RESPECTIVE RIGHTS TO A JURY TRIAL WITH RESPECT TO
ANY DISPUTE.

16. This Amendment may be executed in any number of counterparts, each of which
shall be an original, but all of which taken together shall constitute one and
the same instrument.

17. This Amendment shall be binding upon and inure to the benefit of the parties
hereto and their respective successors and assigns. The Borrower shall not have
the right to assign any of its rights or obligations under or delegate any of
its duties under the Credit Agreement, as amended by this Amendment, or any of
the other Loan Documents.

18. The Borrower hereby agrees that it will pay on demand all out-of-pocket
expenses incurred by the Bank in connection with the preparation of this
Amendment and any other related documents, including but not limited to the fees
and disbursements of counsel for the Bank.

19. This Amendment and the promissory note described in paragraph 10(d) of this
Amendment represent the final agreement between the Borrower and the Bank with
respect to the subject matter hereof, and may not be contradicted, modified or
supplemented in any way by evidence of any prior or contemporaneous written or
oral agreements of the Borrower and the Bank.

[Remainder of Page Intentionally Left Blank]

 

7

--------------------------------------------------------------------------------

IN WITNESS WHEREOF, the Borrower and the Bank have caused this Amendment to be
executed by their duly authorized officers under seal as of the date first
written above.

 

TREX COMPANY, INC. By:  

/s/ Paul D. Fletcher

  (SEAL) Name:   Paul D. Fletcher   Title:   Senior Vice President and Chief
Financial Officer   BRANCH BANKING AND TRUST COMPANY OF VIRGINIA   By:  

/s/ David A. Chandler

  (SEAL) Name:   David A. Chandler   Title:   Senior Vice President  

Exhibit I-4 - Promissory Note (Revolving Note)

 

8