EX-23.1 5 dex231.htm EXHIBIT 23.1 Exhibit 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-161732) and related Prospectus of Trex Company, Inc. for the registration of common stock, preferred stock, debt securities, depositary shares, warrants and rights and to the incorporation by reference therein of our reports dated August 7, 2009, with respect to the consolidated financial statements and schedule of Trex Company, Inc., and the effectiveness of internal control over financial reporting of Trex Company, Inc., included in its Annual Report (Form 10-K/A) for the year ended December 31, 2008, filed with the Securities and Exchange Commission.

 

/s/ ERNST & YOUNG LLP

Richmond, Virginia

September 28, 2009