Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Open Worksheet Sort Data
When I open a worksheet (Refer To CT), I want to automatically sort a named
range by column A in descending order so that blank row are at the bottom. The named range is "CTReferRecords". Can anyone help me with the code? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Open Worksheet Sort Data
Use the sheet activate event
right click on the sheet and select view code: Put in code like this Private Sub Worksheet_Activate() Dim rng As Range Set rng = Range("CTReferRecords") rng.Sort Key1:=rng(1), Order1:=xlAscending, _ Header:=xlYes End Sub I open workbooks and activate worksheets, so I may not understand your situation. -- Regards, Tom Ogilvy "TonyD" wrote: When I open a worksheet (Refer To CT), I want to automatically sort a named range by column A in descending order so that blank row are at the bottom. The named range is "CTReferRecords". Can anyone help me with the code? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to sort data from one worksheet into other worksheets? | Excel Worksheet Functions | |||
SORT DATA ON A PROTECTED WORKSHEET! | Excel Worksheet Functions | |||
Run VBA sort when I open worksheet | Excel Discussion (Misc queries) | |||
Can you sort data on one worksheet into many worksheets? | Excel Discussion (Misc queries) | |||
How to sort data into a new worksheet | Excel Discussion (Misc queries) |