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
|
|||
|
|||
![]()
it works just fine thank you very much.
other question: there is some way to create a texbox but when you write in it the characters appears as (**********) (like the textboxes used in paswords textboxes) "Jim Thomlinson" wrote: 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. |
#4
![]()
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 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Be careful with used range. It is similar to xlLastCell in that it is set
when the spreadsheet is saved, so it may not be the cell you think it is when you run the code... HTH "filo666" wrote: 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 |
#6
![]()
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. |
#7
![]()
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 |
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 |