View Single Post
  #11   Report Post  
Posted to microsoft.public.excel.programming
L. Howard L. Howard is offline
external usenet poster
 
Posts: 852
Default Modify Claus code "Sub Array_Var_Column_Sort()"

I tried this, which put i to 1 (one) in the code line, but still errors out.

For i = LBound(varKey) To UBound(varKey)
For ii = LBound(varRow) To UBound(varRow)
i = i + 1
.Range(.Cells(1, 1), .Cells(varRow(ii), i)).Sort _
Key1:=.Range(varKey(i)), order1:=xlAscending, Header:=xlNo 'Header:=xlYes

Next
Next

Howard