Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
look the folowing code atached:
Cells(1, 1).Select ActiveSheet.Cells(Rows.Count, ActiveCell.Column).End(xlUp).Select ActiveCell.EntireRow.Select SendKeys "(^+{home})" I want to change the sendkey line to a function (the send key press control+shift+home so it selects tall the rows from the bottom to the beginning of the sheet) TIA. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Forget SENDKEYS and the other code. For the described action these three
lines will do it. There are additional methods but this is very direct. In your case the first line may actully be enough by itself since it would select all used cells regardless when they reside. If row 1 was empty and not selected it would not affect the net result in most cases. Just depends on what you really want to accomplish. Activesheet.Usedrange.Select ROWCOUNT=activesheet.Usedrange.Rows.Count+Activece ll.Row-1 Range("A1",Cells(ROWCOUNT,1).Address).Entirerow.Se lect "filo666" wrote: look the folowing code atached: Cells(1, 1).Select ActiveSheet.Cells(Rows.Count, ActiveCell.Column).End(xlUp).Select ActiveCell.EntireRow.Select SendKeys "(^+{home})" I want to change the sendkey line to a function (the send key press control+shift+home so it selects tall the rows from the bottom to the beginning of the sheet) TIA. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
How about:
activesheet.usedrange.rows.select or with activesheet .range("a1",.usedrange).rows.select end with or With ActiveSheet .Range("a1", .Cells(.Rows.Count, ActiveCell.Column).End(xlUp)) _ .EntireRow.Select End With (I think it's the last one, but I'm kind of confused.) filo666 wrote: look the folowing code atached: Cells(1, 1).Select ActiveSheet.Cells(Rows.Count, ActiveCell.Column).End(xlUp).Select ActiveCell.EntireRow.Select SendKeys "(^+{home})" I want to change the sendkey line to a function (the send key press control+shift+home so it selects tall the rows from the bottom to the beginning of the sheet) TIA. -- Dave Peterson |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Jim, Frank and Dave: tanks you very much, all the information you gave me was
very helpfully "Dave Peterson" wrote: How about: activesheet.usedrange.rows.select or with activesheet .range("a1",.usedrange).rows.select end with or With ActiveSheet .Range("a1", .Cells(.Rows.Count, ActiveCell.Column).End(xlUp)) _ .EntireRow.Select End With (I think it's the last one, but I'm kind of confused.) filo666 wrote: look the folowing code atached: Cells(1, 1).Select ActiveSheet.Cells(Rows.Count, ActiveCell.Column).End(xlUp).Select ActiveCell.EntireRow.Select SendKeys "(^+{home})" I want to change the sendkey line to a function (the send key press control+shift+home so it selects tall the rows from the bottom to the beginning of the sheet) TIA. -- Dave Peterson |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try this
ActiveSheet.Range("A1", Range("A65535").End(xlUp)).EntireRow.Select HTH "filo666" wrote: look the folowing code atached: Cells(1, 1).Select ActiveSheet.Cells(Rows.Count, ActiveCell.Column).End(xlUp).Select ActiveCell.EntireRow.Select SendKeys "(^+{home})" I want to change the sendkey line to a function (the send key press control+shift+home so it selects tall the rows from the bottom to the beginning of the sheet) TIA. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I stop "global" hyperlinks changing to "local" links? | Excel Worksheet Functions | |||
Excel: Changing "numeric $" to "text $" in a different cell. | Excel Worksheet Functions | |||
Changing "returned" values from "0" to "blank" | Excel Worksheet Functions | |||
sendkeys "^v" behavior changed with the office 2003 version? | Excel Programming | |||
SENDKEYS change the "Number Lock" status | Excel Programming |