EX-23 2 dex23.htm CONSENT OF ERNST & YOUNG LLP, INDEPENDENT REGISTERED PUBLIC ACCOUNTING FIRM Consent of Ernst & Young LLP, Independent Registered Public Accounting Firm

Exhibit 23

Consent of Ernst & Young LLP, Independent Registered Public Accounting Firm

We consent to the incorporation by reference in the following Registration Statements

 

   

Form S-8, No. 333-76847,

 

   

Form S-8, No. 333-83998, and

 

   

Form S-8, No. 333-124685;

of our report dated March 14, 2006 (except with respect to the matters discussed in Note 2, to which the date is March 6, 2007), with respect to the consolidated financial statements of Trex Company, Inc. (Trex), and our report dated March 14, 2006 (except with respect to the expanded description of the effects of the material weakness in internal control over financial reporting, as to which the date is March 6, 2007) with respect to Trex’s management’s assessment of the effectiveness of internal control over financial reporting and the effectiveness of internal control over financial reporting of Trex Company, Inc., included in this Annual Report (Form 10-K/A) for the year ended December 31, 2005.

 

    /s/ ERNST & YOUNG LLP

McLean, Virginia

 

March 6, 2007