Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I keep getting this error message with my spreadsheet and I do not
know what it means. Can anyone help. Error Message : The sort reference is not valid. Make sure that it's within the data you want to sort, and the first SORT BY box isn't the same or blank Below is my source code: For Each w In Worksheets w.Activate ActiveCell.SpecialCells(xlLastCell).Select lnRange = CInt(Mid(ActiveCell.Address(RowAbsolute:=False), 3, 5)) lcCellRange = "A3:G" & Trim(Str(lnRange - 1)) w.Range(lcCellRange).Select Selection.Sort Key1:=Range("C3"), Order1:=xlAscending, Header:=xlNo, _ OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom w.Range("A1").Select Next w |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Zip code sort is an Excel problem even when using the special cat. | Excel Discussion (Misc queries) | |||
Newbie Question: Data/Sort | New Users to Excel | |||
VBA Newbie: Help with Do Loop code | Excel Discussion (Misc queries) | |||
Sort (in Excel) from code in MSProject | Excel Programming | |||
Newbie : Autofilter thru code ? | Excel Programming |