#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 189
Default question on VB-sort

hi,
I see an error when I run the following code.the order focuses on "order"
poping up a message like"named argument not found"??any help?

Private Sub CommandButton16_Click()
Sheets("sheet1").Activate
Range("e95:g108").Sort key1:=Range("e95"), Order:=xlDescending
End Sub

thanx
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,316
Default question on VB-sort

Change
Range("e95:g108").Sort key1:=Range("e95"), Order:=xlDescending

To
Range("e95:g108").Sort key1:=Range("e95"), Order1:=xlDescending


Kevin Backmann


"peyman" wrote:

hi,
I see an error when I run the following code.the order focuses on "order"
poping up a message like"named argument not found"??any help?

Private Sub CommandButton16_Click()
Sheets("sheet1").Activate
Range("e95:g108").Sort key1:=Range("e95"), Order:=xlDescending
End Sub

thanx

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 189
Default question on VB-sort

many thanks Kevin.it works.

"Kevin B" wrote:

Change
Range("e95:g108").Sort key1:=Range("e95"), Order:=xlDescending

To
Range("e95:g108").Sort key1:=Range("e95"), Order1:=xlDescending


Kevin Backmann


"peyman" wrote:

hi,
I see an error when I run the following code.the order focuses on "order"
poping up a message like"named argument not found"??any help?

Private Sub CommandButton16_Click()
Sheets("sheet1").Activate
Range("e95:g108").Sort key1:=Range("e95"), Order:=xlDescending
End Sub

thanx

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
Sort question?? SAM SEBAIHI Excel Discussion (Misc queries) 0 November 29th 06 02:03 AM
sort question D Excel Worksheet Functions 0 August 2nd 06 10:08 PM
Sort question pgruening Excel Discussion (Misc queries) 0 May 18th 06 08:22 PM
sort question Romi Excel Discussion (Misc queries) 1 June 16th 05 11:25 PM
Lookup and Sort Question Josh O. Excel Discussion (Misc queries) 7 December 9th 04 08:18 PM


All times are GMT +1. The time now is 01:02 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"