LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 108
Default sorting on a non active sheet

I feel very foolish asking this question but I have been going round and
round on this too long. I have the following code in a Userform (not in a
module):
Sheets(1).Activate
Sheets(1).Range(Cells(3,1),Cells(15,20)).Select
Selection.sort Key1:=Range(A2), Order1:=xlAscending _
, Key2:=Range(D2), Order2:=xlAscending _
, Header:=xlGuess, OrderCustom:=1, MatchCase:=False _
, Orientation:xlTopToBottom
The code works fine.
However, I now want to do the sort without activating sheet(1). I have
tried all kinds of ways to do the ranges without using selection but to no
avail. I went thru the postings and could not find another posting close to
this. Can someone help me.

--
russ
 
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
Copy sheet and make new sheet active belvy123 Excel Discussion (Misc queries) 5 April 24th 08 03:33 PM
I need to sort an active sheet using the col of the active cell HamFlyer Excel Programming 3 June 6th 06 07:25 PM
Active Cell Copy And Paste Sheet to Sheet A.R.J Allan Jefferys New Users to Excel 4 May 4th 06 02:04 AM
Copy my active sheet to a new sheet and open with an input form Brad Withrow Excel Programming 0 April 6th 06 03:56 AM
Copy from active sheet and paste into new sheet using info from cell in active Ingve Excel Programming 3 January 23rd 06 09:57 PM


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