View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
joel joel is offline
external usenet poster
 
Posts: 9,101
Default SORT: Is it possible to supply operands via function / vba sub

I got the range wrong. Below is the correction.

Worksheets("sheet1"). _
Range(target).Sort _
Key1:=Worksheets("sheet1").Columns(mykey1), _
Key2:=Worksheets("sheet1").Columns(mykey2), _
Key3:=Worksheets("sheet1").Columns(mykey3), _
Header:=xlNo, DataOption1:=xlSortNormal


"Mike Iacovou" wrote:

thanks joel

i'll give that a try. cheers.

Mike