none
range sort RRS feed

  • Question

  • trying to do a range sort "B2:D5" from left to right using B3 as key with

    Excel.Range rngS = ((Excel.Worksheet)Globals.ThisAddIn.Application.Sheets[2]).get_Range("B2").get_Resize(4, 3);
    Excel.Range rngK = ((Excel.Worksheet)Globals.ThisAddIn.Application.Sheets[2]).get_Range("B3");
    rngS.Sort(rngK, Excel.XlSortOrder.xlAscending, Excel.XlYesNoGuess.xlNo, Excel.XlSortOrientation.xlSortColumns);

    but get reference error. using C# with VS2010. can anyone help?


    • Edited by Dalai Friday, July 26, 2013 3:09 PM
    • Changed type Jeffrey_Chen_Moderator Monday, July 29, 2013 4:05 PM this is a question rather than discussion
    Friday, July 26, 2013 3:08 PM

Answers

All replies