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

Hi all,

I am writing a Sub to process a CSV. This code will perform (amongst other
bits) a SORT on the data. However, the sort procedure will vary with the data
- such that the sort Range, Order & Key will vary.
I was hoping it would be possible to supply the range,order & key TO the
Sub, and then use the passed information within the SORT vba code to perform
the function... but I can't find any information regarding declaring the
Order operands etc... can this be done?

I know that the Key can be specified by referencing a cell, but can I just
use an expression directly? What is Order object / operand to be declared as
etc?

Any guidance greatly appreciated. KR

Mike