Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Select region
Hi
I've not got used to programming excel. I'm trying to select the bottom right cell and then select the current region in order to do a sort of the first three columns without headers. I'm obviously getting it wrong!!! Here's my code, but instead of getting the bottom right I've been getting A4 as the data range I want to sort will always start there. When I execute this, just row 1 gets hilighted and then the sort call gets thrown out. m_oSheet.Cells.Range("A4").Select m_oSheet.Cells.Range("A4").Activate With m_oSheet.Cells.CurrentRegion .Select .Activate .Sort Key1:=Range("C4"), Order1:=xlAscending, _ Key2:=Range("B4"), Order2:=xlAscending, _ Key3:=Range("A4"), Order3:=xlAscending, _ Header:=xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _ DataOption1:=xlSortNormal, DataOption2:=xlSortNormal, DataOption3:=xlSortNormal End With Thanks Simon |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Paste values all cells in a region which refers to out of region | Excel Worksheet Functions | |||
Select filled region only in non-adjacent columns | Excel Discussion (Misc queries) | |||
[Help]Excel mouse select region | Excel Programming | |||
Select current region and print | Excel Programming | |||
Select current region less one column | Excel Programming |