EX-23.1 5 dex231.htm EXHBIT 23.1 Exhbit 23.1

Exhibit 23.1

Consent of Independent Registered Public Accounting Firm

We consent to the reference to our firm under the caption “Experts” in this Amendment No. 1 to the Registration Statement (Form S-3, No. 333-143171) and related Prospectus of Trex Company, Inc. for the registration of $100,000,000 of Debt Securities, Common Stock, Preferred Stock, Depositary Shares, Warrants and Rights and to the incorporation by reference therein of our reports dated April 2, 2007, with respect to the consolidated financial statements of Trex Company, Trex Company management’s assessment of the effectiveness of internal control over financial reporting, and the effectiveness of internal control over financial reporting of Trex Company, included in its Annual Report (Form 10-K) for the year ended December 31, 2006, filed with the Securities and Exchange Commission.

Ernst & Young LLP

Richmond, Virginia

June 4, 2007