Home |
Search |
Today's Posts |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Put a space character between the .Sort and the underscore.
.cells.sort _ Ayo wrote: This is what I have: With pastDueWS.Range("A2:F" & pastDueWSlastRow) .Cells.Sort_ Key1:=.columns(1), Order1:=xlAscending, _ Key2:=.columns(4), Order2:=xlAscending, _ Key3:=.columns(3), Order3:=xlAscending, _ .Header = xlYes .MatchCase = False .Orientation = xlTopToBottom End With And this section: Key1:=.columns(1), Order1:=xlAscending, _ Key2:=.columns(4), Order2:=xlAscending, _ Key3:=.columns(3), Order3:=xlAscending, _ .Header = xlYes of it is all RED. And it seem to be indicating that ":=" is an error and I can't figure out why. "Dave Peterson" wrote: You didn't include the line above. The line starting with Key1:= is a continuation of the previous line. Ayo wrote: I am having a problem. There seem to be an issue with ":=" The whole statement : Key1:=.columns(1), Order1:=xlAscending, _ Key2:=.columns(4), Order2:=xlAscending, _ Key3:=.columns(3), Order3:=xlAscending, _ .Header = xlYes is RED. "Dave Peterson" wrote: xl2007 changed the syntax that you can use when you sort the data--and it records macros using this syntax. You can still use the xl2003 (and before) syntax if you want in xl2007. You can either record a sort macro in xl2003 or rely on your memory for syntax--or maybe this would help. with myrng .cells.sort _ Key1:=.Columns(1), Order1:=xlAscending, _ key2:=.columns(3), order2:=xldescending, _ Header:=xlno, _ OrderCustom:=1, MatchCase:=False, _ Orientation:=xlTopToBottom end with Ayo wrote: I am having a problem with this line of code. "pastDueWS.AutoFilter.Sort.SortFields.Clear" It works fine on my computer, 2007, but not on my boss computer, 2003. Is there a way to fix this? -- Dave Peterson . -- Dave Peterson . -- Dave Peterson |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
runtime error 434, object does not support this method or property | Excel Discussion (Misc queries) | |||
Object doesn't support this property or method (Error 438) | Excel Programming | |||
help with my code please. (Error: Object doesn't support this property or method) | Excel Programming | |||
Object doesn't support this property or method (Error 438) | Excel Discussion (Misc queries) | |||
Run Time Error 438 - Object doesn't support the property or method | Excel Programming |