Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ayo Ayo is offline
external usenet poster
 
Posts: 489
Default Object doesn't support this property or metheod ERROR

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?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 126
Default Object doesn't support this property or metheod ERROR

I don't believe 2003 has the AutoFilter.SORT method, just Application,
Filters, Parent and Range. SORT must have been added in 2007. ???
--
Hope this helps.
If it does, please click the Yes button.
Thanks in advance for your feedback.
Gary Brown



"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?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Object doesn't support this property or metheod ERROR

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
  #4   Report Post  
Posted to microsoft.public.excel.programming
Ayo Ayo is offline
external usenet poster
 
Posts: 489
Default Object doesn't support this property or metheod ERROR

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
.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Object doesn't support this property or metheod ERROR

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


  #6   Report Post  
Posted to microsoft.public.excel.programming
Ayo Ayo is offline
external usenet poster
 
Posts: 489
Default Object doesn't support this property or metheod ERROR

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
.

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Object doesn't support this property or metheod ERROR

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
  #8   Report Post  
Posted to microsoft.public.excel.programming
Ayo Ayo is offline
external usenet poster
 
Posts: 489
Default Object doesn't support this property or metheod ERROR

Disregard my last reply. I figured it out. I forgot the space between .Sort
and _

"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
.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
runtime error 434, object does not support this method or property Janis Excel Discussion (Misc queries) 4 January 17th 08 04:10 PM
Object doesn't support this property or method (Error 438) gazza67[_2_] Excel Programming 2 August 9th 07 02:30 AM
help with my code please. (Error: Object doesn't support this property or method) funkymonkUK[_137_] Excel Programming 5 April 6th 06 03:44 PM
Object doesn't support this property or method (Error 438) Kiran Excel Discussion (Misc queries) 1 July 12th 05 08:42 PM
Run Time Error 438 - Object doesn't support the property or method Paul Cottier Excel Programming 0 September 10th 04 01:27 AM


All times are GMT +1. The time now is 10:28 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"