Home > Software engineering >  Could you tell me how to solve this? Excel vba, error 438, an object does not support this property
Could you tell me how to solve this? Excel vba, error 438, an object does not support this property

Time:11-13

This is the superior department sent me unit of a worksheet, on their computers can run normally, in my unit unit computer I try each time is wrong, 438 superior departments is win10 + office2016, myself with wps2019 and office2016 tried in won7 and win10 respectively, are unable to run, how be to return a responsibility excuse me? The code is as follows:
Sheets (" outstanding parts "). Select
ActiveWorkbook. Worksheets (" outstanding parts "). Sort. SortFields. Clear
ActiveWorkbook. Worksheets (" outstanding parts "). Sort. SortFields. Add2 Key:=Range (" H1 "), _
SortOn:=xlSortOnValues, Order:=xlDescending, DataOption:=xlSortNormal - this is a line running failure,
With ActiveWorkbook. Worksheets (" outstanding parts "). The Sort
The SetRange Range (" A1: L2000 ")
The Header=xlYes
The MatchCase=False
The Orientation=xlTopToBottom
. SortMethod=xlPinYin
. Apply
End With

CodePudding user response:

refer to the original poster weixin_45177242 response:
this is the superior department sent me the unit of a worksheet, on their computers can run normally, in my unit unit computer I try each time is wrong, 438 superior departments is win10 + office2016, myself with wps2019 and office2016 tried in won7 and win10 respectively, are unable to run, how be to return a responsibility excuse me? The code is as follows:
Sheets (" outstanding parts "). Select
ActiveWorkbook. Worksheets (" outstanding parts "). Sort. SortFields. Clear
ActiveWorkbook. Worksheets (" outstanding parts "). Sort. SortFields. Add2 Key:=Range (" H1 "), _
SortOn:=xlSortOnValues, Order:=xlDescending, DataOption:=xlSortNormal - this is a line running failure,
With ActiveWorkbook. Worksheets (" outstanding parts "). The Sort
The SetRange Range (" A1: L2000 ")
The Header=xlYes
The MatchCase=False
The Orientation=xlTopToBottom
. SortMethod=xlPinYin
. Apply
End With

In addition, the work table in parts of other sort this mistake

CodePudding user response:

The test office to have WPS unloading;

CodePudding user response:

CodePudding user response:

To: "Sort. SortFields. Add 2 Key: "replace" Sort. SortFields. Add the Key: ",
  •  Tags:  
  • VBA
  • Related