colinharwood
Active Member
- Joined
- Jul 27, 2002
- Messages
- 426
- Office Version
- 2019
- Platform
- Windows
Hi
I have the following code in a macro, which I recorded, in a worksheet which works fine on my PC. I have now given the workbook to a friend, and he gets Run-time error'438': Object doesn't support this property or method at the lines in red. Could anyone explain why please.
Thanks
I have the following code in a macro, which I recorded, in a worksheet which works fine on my PC. I have now given the workbook to a friend, and he gets Run-time error'438': Object doesn't support this property or method at the lines in red. Could anyone explain why please.
Thanks
Code:
'sort alphabeticaly
Range("R10:T130").Select
ActiveWorkbook.Worksheets("PDF Membership Card").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("PDF Membership Card").Sort.SortFields.Add2 Key:= _
Range("S10:S130"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption _
:=xlSortNormal
With ActiveWorkbook.Worksheets("PDF Membership Card").Sort
.SetRange Range("R10:T130")
.Header = xlGuess
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Last edited by a moderator: