Thread: sort method
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Gary Keramidas Gary Keramidas is offline
external usenet poster
 
Posts: 2,494
Default sort method

i didn't get an error, seemed to work ok with my test data

--


Gary


"badazizi" wrote in message
...
Why do I get a compile error 'Expected: =" when I try to call the
following
procedure I created?

Private Sub SortPricingDataRange()
Dim myRange As Range
Set myRange = Worksheets("Sheet3").Range("A1:E6")
myRange.Sort _
Key1:=Worksheets("Sheet3").Range("A1"), _
Key2:=Worksheets("Sheet3").Range("B1"), _
Key3:=Worksheets("Sheet3").Range("C1"), _
Header:=xlYes
End Sub