View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Marcello Marcello is offline
external usenet poster
 
Posts: 4
Default sortTable works in 2003 but not in 2007

Hi
I am a newbie and received a file use VB to create a league table. The
results are entered on a separate sheet and the league table updates
automatically when the league table worksheet is selected. Great in 2003 but
when i open the file in 2007, i get a "Compile error, invalid use of
property". Basically the code below seems to be the problem, but i have no
idea how to correct it.

Private Sub sortTable()
sort sortRange:=Table.Range("leagueTable"), _
sortKey1:=Range("A4"), _
sortKey2:=Range("Y4"), _
sortOrder2:=xlDescending, _
sortKey3:=Range("W4")
' Range("B3").Select
End Sub

Any help would be greatly appreciated.