title: VBA code To set Print Area, fit to 1x1 page and not set print area for certain tabs
body: <p>I have this code to set the print area of certain sheets in a workbook.  I'm trying to set the print area so it fits each tab on one page and doesn't divide it into several pages.  Also could someone please help me with code to not set the print area on certain tabs based on the same cell value in each tab?</p>
  
  <pre><code>Sub PrintArea()
  
      Dim I As Integer
      Dim ws As Worksheet
  
      WS_Count = ActiveWorkbook.Worksheets.Count
      For I = 1 To 6
  
      Set ws = ThisWorkbook.Sheets(I)
  
      ws.PageSetup.PrintArea = ws.Range("A1:Z24").Address
  
      With ws.PageSetup
          .Orientation = xlLandscape
          .FitToPagesWide = 1
          .FitToPagesTall = 1
  
     End With
     Next I
  
  End Sub
  </code></pre>