Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
move cursor to empty row ?
What is the command to move cursor to empty row ?
Regards, Tee |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
move cursor to empty row ?
There is no commands that stops on an empty row. Excel stops on data.
You can get either the last cell of the curent region or the last cell used on the worksheet. Then you can increment to the next row set LastCell = ActiveSheet.Cells.SpecialCells(xlCellTypeLastCell) LastRow = LastCell.Row EmptyRow = LastRow + 1 "Eng Teng" wrote: What is the command to move cursor to empty row ? Regards, Tee |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
move cursor to empty row ?
Actually there may be one thing you can do, depending on what your data looks
like: You can simulate the <End<Down key sequence. On your keyboard if your selected cell has data in it and you hit <End and then one of the arrow keys, Excel moves the selection to the next empty cell in that direction. If the selected cell is empty, Excel stops at the first non-blank cell. "Blank" and "non-blank" in this case refer to cells with no formulae in them; formulae that display nothing still count as data for the purpose of this command. To do this in your program try the End method of a range. You may have to look up the details, but I think it works like this: Set EmptyCell = ActiveCell.End(xlDown) MsgBox "Row " & EmptyCell.Row & " is the first empty row." Of course End looks for empty (or non-empty) cells, not rows, but if you know where your data is this often will work for you. --- "Joel" wrote: There is no commands that stops on an empty row. Excel stops on data. You can get either the last cell of the curent region or the last cell used on the worksheet. Then you can increment to the next row set LastCell = ActiveSheet.Cells.SpecialCells(xlCellTypeLastCell) LastRow = LastCell.Row EmptyRow = LastRow + 1 --- "Eng Teng" wrote: What is the command to move cursor to empty row ? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
move cursor on one sheet moves cursor on all sheets | Excel Discussion (Misc queries) | |||
Move the cursor to the next row | Excel Programming | |||
How do I move cursor to next empty space?? | Excel Programming | |||
move cursor | Excel Programming | |||
HOW TO MOVE CURSOR | Excel Programming |