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?
|