![]() |
sort method of range class failed
Well, it tells me that Excel didn't do the sort.
The only problem I can see from your post is that, on the end of the sort line, there should be a line continuation character: Range("A6:EZ65500").Sort Key1:=Range("A6:A65500"), _ also... The "With Selection" and "End With" don't do anything and can be removed. It doesn't have anything to do with the sort, but is the UserForm really named "UserForm" ? -- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware "KyWilde" wrote in message What does this error mean in VBA? I have the following code and it was working before, but all of a sudden I'm receiving the error above. Private Sub Done_Click() Dim lRow As Long Dim counter As Integer Dim r1 As Range, r2 As Range Worksheets("Output").Select lRow = Range("A65536").End(xlUp).Row Set r1 = Range(Cells(lRow, 7), Cells(lRow, 140)) Set r2 = Range(Cells(lRow + 1, 7), Cells(lRow + 1, 140)) r1.Copy r2 With Selection Range("A6:EZ65500").Sort Key1:=Range("A6:A65500"), Key2:=Range("B6:B65500") End With NameFind Unload UserForm End Sub Any help would be wonderful! Thanks! -Kyrsten Wilde |
All times are GMT +1. The time now is 10:17 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com