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

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
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,223,268
Messages
6,171,100
Members
452,379
Latest member
IainTru

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