View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett[_4_] Don Guillett[_4_] is offline
external usenet poster
 
Posts: 2,337
Default Selecting range question

Should probably be (for sort key)

Sheets("TEST").range("A1:F129").Sort Key1:=sheets("test").Range("F2"), _
Order1:=xlDescending, Header:=xlGuess, _
OrderCustom:=1, _
MatchCase:=False, _
Orientation:=xlTopToBottom


--
Don Guillett
SalesAid Software

"ToddG" wrote in message
...
Hi Bernie,

Here is a simple example:

Sheets("TEST").Select
Range("A1:F129").Select
Selection.Sort Key1:=Range("F2"), _
Order1:=xlDescending, Header:=xlGuess, _
OrderCustom:=1, _
MatchCase:=False, _
Orientation:=xlTopToBottom


-----Original Message-----
Todd,

You rarely ever need to select anything: post all your

code, and we can give
you some pointers as to how to re-write without using

select.

HTH,
Bernie
MS Excel MVP

"ToddG" wrote in

message
...
I have the following code to select a range:

Sheets("TEST").Select
Range("A1:F129").Select

Is there a way to select this range WITHOUT first
selecting the sheet? I'd like to speed up my macro and
thought this would be a good place to start.

I tried:

Sheets("TEST").Range("A1:F129")

and I get an error.

TIA, Todd



.