Repost of find and move values<0
Thanks for the tip. I modified the code and got beyond that error. However,
I ran into several other errors. I googled the errors and came up with a few
solutions .
Location: Range("A1:B"). Select.
Message: Run time error 1004. Range of obejct global failed.
Solution: changed code to Range("A1:B2285).Select
Location:ActiveWorkbook.Worksheets("Sheet2").Sort. SortFields.Clear
Message:Run time error 438 object doesn't support this property or method
Solution: Moved code from excel 2003 to 2007
Location:ActiveWorkbook.Worksheets("Sheet2").Sort. SortFields.Add
Key:=Range("D"), SortOn:=xlSortOnValues, Order:=xlAscending,
DataOption:=xlSortNormal
Message: Run time error 1004. Range of obejct global failed.
Solution: Added 1 in front of D to make Key:=Range("D1")
Location: .Apply.
Message: run-time error '1004': "The sort reference is not valid. Make sure
it's within the data you want to sort, and the first Sort By box isn't the
same or blank.
Solution: None
So, I am not sure my solutions are 100% correct. And I have no idea how to
solve the last error.
Would appreciate any help.
"Gord Dibben" wrote:
These are all one line
ActiveWorkbook.Worksheets("YourOthrerSheetName").S ort.SortFields.Add _
Key:=Range("YourColumn"), _
SortOn:=xlSortOnValues, Order:=xlAscending,DataOption:=xlSortNormal
Note I have added one more line-continuation mark(_) to tie them together.
Gord Dibben MS Excel MVP
On Sun, 28 Sep 2008 14:31:01 -0700, Sojo
wrote:
ActiveWorkbook.Worksheets("YourOthrerSheetName").S ort.SortFields.Add
Key:=Range("YourColumn"), _
SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
|