Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Coding Equivalent of CRL-A?
When in a worksheet I can manually select all cells by doing a control-A is there an equivalent I can use when coding?
I tried recording a macro and it just enters the particular range that was selected so is not dynamic in the way control-A is. I am trying to do this as a precondition before doing a sort on all the data. |
#2
|
|||
|
|||
Quote:
ActiveWorkbook.Worksheets("SS").Sort.SortFields.Cl ear ActiveWorkbook.Worksheets("SS").Sort.SortFields.Ad d Key:=Sheet8.UsedRange, _ SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal With ActiveWorkbook.Worksheets("SS").Sort .SetRange Range(?????????) .Header = xlYes .MatchCase = False .Orientation = xlTopToBottom .SortMethod = xlPinYin .Apply End With |
#3
|
|||
|
|||
Quote:
Code works if set as follows ActiveWorkbook.Worksheets("SS").Sort.SortFields.Cl ear ActiveWorkbook.Worksheets("SS").Sort.SortFields.Ad d Key:=Range("A:A"), _ SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal With ActiveWorkbook.Worksheets("SS").Sort .SetRange Sheet8.UsedRange .Header = xlYes .MatchCase = False .Orientation = xlTopToBottom .SortMethod = xlPinYin .Apply End With Hope this helps someone else save some pain |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Coding Equivalent of CRL-A?
Hi,
Am Wed, 19 Sep 2012 09:25:55 +0000 schrieb Caveman1957: When in a worksheet I can manually select all cells by doing a control-A is there an equivalent I can use when coding? try: ActiveSheet.UsedRange.Select Regards Claus Busch -- Win XP PRof SP2 / Vista Ultimate SP2 Office 2003 SP2 /2007 Ultimate SP2 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Coding Equivalent of CRL-A?
On 19/09/2012 11:53 PM, Claus Busch wrote:
Hi, Am Wed, 19 Sep 2012 09:25:55 +0000 schrieb Caveman1957: When in a worksheet I can manually select all cells by doing a control-A is there an equivalent I can use when coding? try: ActiveSheet.UsedRange.Select Regards Claus Busch Try: Cells.Select HTH Mick. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
VBA equivalent for XLL? | Excel Programming | |||
Left() Need the equivalent of this | Excel Programming | |||
"=ROW()-1" type of coding doesn't appear in a filter / is there coding that does? | Excel Programming | |||
Implant macro coding into ASP coding | Excel Programming | |||
Equivalent Of VAL | Excel Programming |