View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Kelly******** Kelly******** is offline
external usenet poster
 
Posts: 33
Default sorting with a macro

why dont this work on other machine(pc) copied to same location(folder) same
name and every thing. the only thing is I used excel 2002 and I dont know
what ver the other pc has on it.
Sub Sort_Drivers()
'
' Sort_Drivers Macro
' Macro by Kelly
'

'
Application.Run "'Points Tracker.xls'!UnprotectAll"
Range("A4:AM104").Select
Range("A4").Activate
Selection.Sort Key1:=Range("A4"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Range("A4").Select
Application.Run "'Points Tracker.xls'!ProtectAll"
End Sub
Sub Sort_Rank()
'
' Sort_Rank Macro
' Macro by Kelly
'

'
Application.Run "'Points Tracker.xls'!UnprotectAll"
Range("A4:AM104").Select
Range("AM4").Activate
Selection.Sort Key1:=Range("AM4"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Range("A4").Select
Application.Run "'Points Tracker.xls'!ProtectAll"
End Sub