How to sort more than 3 columns in VBA?
<p>I want to sort more than 3 columns in VBA. When I add key4, it shows "Named argument not found." How can I handle this? Here is my code:</p>

<pre><code>Private Sub SubLieutenant_Click()
Dim LastRow As Long


LastRow = Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
Range("F6:F" &amp; LastRow).Formula = "=DateDif(C6, Today(),""y"")+DateDif(E6, Today(), ""d"")/30"

Range("A6").Sort key1:=Range("F6"), order1:=xlDescending, key2:=Range("E6"), order2:=xlAscending, key3:=Range("D6"), order3:=xlAscending, key4:=Range("C6"), order4:=xlAscending, Header:=xlYes

End Sub
</code></pre>