#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default sort method

Why do I get a compile error 'Expected: =" when I try to call the following
procedure I created?

Private Sub SortPricingDataRange()
Dim myRange As Range
Set myRange = Worksheets("Sheet3").Range("A1:E6")
myRange.Sort _
Key1:=Worksheets("Sheet3").Range("A1"), _
Key2:=Worksheets("Sheet3").Range("B1"), _
Key3:=Worksheets("Sheet3").Range("C1"), _
Header:=xlYes
End Sub
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default sort method

i didn't get an error, seemed to work ok with my test data

--


Gary


"badazizi" wrote in message
...
Why do I get a compile error 'Expected: =" when I try to call the
following
procedure I created?

Private Sub SortPricingDataRange()
Dim myRange As Range
Set myRange = Worksheets("Sheet3").Range("A1:E6")
myRange.Sort _
Key1:=Worksheets("Sheet3").Range("A1"), _
Key2:=Worksheets("Sheet3").Range("B1"), _
Key3:=Worksheets("Sheet3").Range("C1"), _
Header:=xlYes
End Sub



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default sort method

Your code ran fine for me. (even as the click event of a commandbutton on
another sheet).

--
Regards,
Tom Ogilvy


--
Regards,
Tom Ogilvy

"badazizi" wrote in message
...
Why do I get a compile error 'Expected: =" when I try to call the

following
procedure I created?

Private Sub SortPricingDataRange()
Dim myRange As Range
Set myRange = Worksheets("Sheet3").Range("A1:E6")
myRange.Sort _
Key1:=Worksheets("Sheet3").Range("A1"), _
Key2:=Worksheets("Sheet3").Range("B1"), _
Key3:=Worksheets("Sheet3").Range("C1"), _
Header:=xlYes
End Sub



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
Help with Sort Method turnerje[_7_] Excel Programming 1 October 6th 05 09:21 PM
sort method benb Excel Programming 6 April 7th 05 04:00 PM
Using the Sort Method Jill E Excel Programming 2 August 6th 04 01:29 PM
Sort Method Squid[_3_] Excel Programming 3 March 2nd 04 02:25 PM
sort method frustration David Wenham Excel Programming 2 August 21st 03 06:26 PM


All times are GMT +1. The time now is 04:09 AM.

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

About Us

"It's about Microsoft Excel"