March 13th, 2006, 2:21 am
Dear all,How can load a table of data into a range and apply excel's sorting function?I know I can write a bubble sort to do it but I don't want to use bubble sort in this case.I don't want to open a new worksheet, load all data, sort, and read all data, time consuming... e.g.dim temp_data(3,2) as stringtemp_data(1,1) = "z"temp_data(2,1) = "x"temp_data(3,1) = "y"temp_data(1,2) = "3"temp_data(2,2) = "1"temp_data(3,2) = "2"'===== the following code not working=========== dim myRange as rangemyRange = temp_datamyRange.sort Key1:=myRange(1,1), Header:=xlNotemp_data = myRange'======================================Please give me some hints, thank you.