question on VB-sort

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
Change
Range("e95:g108").Sort key1:=Range("e95"), Order:=xlDescending

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


Kevin Backmann
 
many thanks Kevin.it works.

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

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


Kevin Backmann
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

auto sort macro 1
writing a sort macro 2
Automatic sort macro 2
sort macro not working 1
Macro to sort variable data range fails 1
Sorting Madness 5
Sorting VBA problem 6
VB Macro question 2

Back
Top