Problem a friend has getting Error 438 all the time

前端 未结 1 1884
名媛妹妹
名媛妹妹 2021-01-28 16:14

I sent a friend a workbook with a macro that includes some sorting. When he tries it he gets:

Run-time error \'438\' Object doesn\'t support this propert

相关标签:
1条回答
  • 2021-01-28 17:09

    Use SortFields.Add instead of the newer version SortFields.Add2, which is not supported in older versions of Excel.

    From the .Add2 documentation:

    This API includes support for sorting off a SubField from data types, such as Geography or Stocks. You can also use the Add method if sorting by a data type is not needed.

    ... and you are not sorting by data type, so use .Add.

    0 讨论(0)
提交回复
热议问题