title: Using VBA, how can I select multiple rows, on multiple worksheets for printing?
body: <p>I have a spreadsheet that contains multiple worksheets.  I need to select all rows, in certain worksheets, so that I can print all rows, across all selected worksheets, to a single document.</p>
  
  <p>The following code is used to select all pertinent worksheets and rows that are to be printed.  This code works until I attempt to select rows from a second worksheet.</p>
  
  <pre><code>Dim no_selected_worksheets As Boolean
  no_selected_worksheets = True
  
  Dim list_choose As Long
  For list_choose = 0 To FormsToPrint.ListCount - 1
      If FormsToPrint.Selected(list_choose) Then
          With Worksheets(list_choose + 2)
              If no_selected_worksheets Then
                  .Select      'This works.
                  .Rows.Select 'So does this.
                  no_selected_worksheets = False
              Else
                  .Select (False) 'This works too..
                  .Rows.Select    ' but here, VBA reports the error:
                                  ' "Select Method of Range class failed"
              End If
          End With
      End If
  Next
  </code></pre>
  
  <p>How can I fix this bug?</p>