03-10-2014, 09:24 PM
Hello ,
I have a problem sorting 4 columns in excel. I want to be able to sort it by the first column then by the second and all ascending order.
I've tried to play with it a bit but it always gives me sort method of range class failed.
Here is the sample
Macro Macro2
Any help appreciated !
Thank you.
Sergiu
I have a problem sorting 4 columns in excel. I want to be able to sort it by the first column then by the second and all ascending order.
I've tried to play with it a bit but it always gives me sort method of range class failed.
Here is the sample
Macro Macro2
ExcelSheet es1.Init
Excel.Application app=es1.ws.Application
app.Range("A:D").Sort(app.Range("A:A") Excel.xlAscending app.Range("B:B") Excel.xlAscending 0 0 Excel.xlGuess 1 0 Excel.xlSortColumns 0 0 0 0 0)
Any help appreciated !
Thank you.
Sergiu