title: Compile error: End with without with. BUT THE WITH IS THERE
body: <p>To my working code, I had to ad a new <code>With</code> <code>EndWith</code>. No I can't run it anymore and the second <code>EndWith</code> causes the Error. Compile error: End with without with. I tried as well to do e nested <code>With</code> <code>EndWith</code>, it didn't work. Any idea? Thanks for any help!</p>
  
  <p>This is the required part of the code:</p>
  
  <pre><code> With wsSrc
          LastRow = .Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
          For j = 0 To UBound(SearchValues)
              For i = 2 To LastRow
                  If .Cells(i, 1).Value = SearchValues(j) Then
  
                      wsDest.Range("A" &amp; z).Value = .Range("A" &amp; i).Value
                      wsDest.Range("B" &amp; z).Value = .Range("N" &amp; i).Value
                      wsDest.Range("C" &amp; z).Value = .Range("O" &amp; i).Value
                      wsDest.Range("D" &amp; z).Value = .Range("AM" &amp; i).Value
                      wsDest.Range("G" &amp; z).Value = .Range("AH" &amp; i).Value
                      wsDest.Range("I" &amp; z).Value = .Range("P" &amp; i).Value
                      wsDest.Range("J" &amp; z).Value = .Range("E" &amp; i).Value
                      wsDest.Range("K" &amp; z).Value = .Range("F" &amp; i).Value
  
                      z = z + 1
  
                  End If
              Next i
          Next j
     End With
      With wsSrc2
          LastRow2 = .Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
              For k = 2 To LastRow2
                  If .Cells(i, 1).Value = "724" Then
                      wsDest.Range("B" &amp; z).Value = .Range("N" &amp; k).Value
                      wsDest.Range("C" &amp; z).Value = .Range("O" &amp; k).Value
                      wsDest.Range("D" &amp; z).Value = .Range("AM" &amp; k).Value
                      wsDest.Range("G" &amp; z).Value = .Range("T" &amp; k).Value
                      wsDest.Range("I" &amp; z).Value = .Range("P" &amp; k).Value
                      wsDest.Range("J" &amp; z).Value = .Range("E" &amp; k).Value
                      wsDest.Range("K" &amp; z).Value = .Range("F" &amp; k).Value
                      wsDest.Range("A" &amp; z).Value = "724"
                      z = z + 1
                  End If
      End With
  </code></pre>