There is a bug in my code. It should be
Sheets("cpModels").Range("A:B").Sort
Key1:=Sheets("cpModels").Range("A2"), _
Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False
--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
"Chip Pearson" wrote in message
...
Jody,
Try
Sheets("cpModels").Range("A:B").Sort Key1:=Range("A2"), _
Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False
--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
"ssjody" wrote in message
oups.com...
My current code for Sorting selects the sheet, sorts the data
then
returns back to my Data Entry sheet. How can I have this
perform this
without the code selecting the sheet? I just want it to happen
in the
background without the sheets flashing back and forth while
this
happens.
I did a search and found some suggestions but can't find one
that works
for my application.
Thanks Jody
' SortcpModels
Sheets("cpModels").Select
Columns("A:B").Select
Selection.Sort Key1:=Range("A2"), Order1:=xlAscending,
Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False,
Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Sheets("Data Entry").Select
Range("B3").Select