Run Time error 438 "Object doesn't support this property or method"

Hibbster

Board Regular
Joined
Feb 1, 2006
Messages
95
Would anybody know why an excel macro would work for some users but not for others.

It works no problem for 95% of users (including myself) but the other 5% get the Run Time Error.

To be clear everyone is using the same spreadsheet from the same location.

I've stepped into the macro for a user who was getting the error and it errors on a sort command:

ActiveWorkbook.Worksheets("DATA").Sort.SortFields.Add2 Key:=Range _
("AH6:AH155"), SortOn:=xlSortOnValues, Order:=xlDescending, DataOption:= _
xlSortNormal

Many thanks
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Are they all using the same version of Excel?
 
Upvote 0
Have you tried Fluff's suggestion?

I had a similar problem - somehow in some code I'd written for sorting Add had been changed to Add2.
 
Upvote 0
Thanks all. Yes, I have tried Fluff's suggestion and it still works fine for me.

Just waiting to hear back from the 3 field staff who are having the problem.

Will let you know.
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,224,818
Messages
6,181,152
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top