Yes, delete this portion of the code:
It's an added argument to the sort method in recorded code starting in 2002.
This is a discussion on Macros not working in Excel 2000 within the Excel Questions forums, part of the Question Forums category; Hello, I have written the below maros to sort items on an inventory sheet by product number and when I ...
I have written the below maros to sort items on an inventory sheet by product number and when I send it to the units who use Excel 2000 I get a runtime error and it asks to debug. Is there any way I can write it so it will work with this version?
' sortbynumber Macro
' Macro recorded 3/26/2004 by
Selection.EntireColumn.Hidden = False
Selection.Sort Key1:=Range("B10"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
Selection.EntireColumn.Hidden = True
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True