View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Francisco Francisco is offline
external usenet poster
 
Posts: 25
Default Sort bug on Excel 2007

On Excel 2003 it works perfectly, on Excel 2007 I have error 1004 "sort
method of range class failed".


Sub SortSalary(CellToSort As String, SortRange1 As String)
Sheets(1).Range(SortRange1).Sort Key1:=Range(CellToSort),
Order1:=xlAscending, Header:=xlYes
End if


Is it a bug on Excel 2007?