Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Move cursor down, skipping hidden rows
How can I program the cursor to do what happens when I press the Down
Arrow key, with regard to ignoring hidden rows? If I use [VBA] ActiveCell.Offset(1, 0).Select ....the cursor moves down to the next numerical row, which may be a hidden row. If I use [VBA] SendKeys "{DOWN}" ....it behaves like CTRL+SHIFT+Down Arrow, selecting all the contiguous non-blank cells below the active cell. That's not as advertised, right?? (I have to remember not to execute this statement while in the VBA editor, because from there it just moves the VBA editor's cursor.) This is in Excel 2000. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Move cursor down, skipping hidden rows
Try this
Dim rng As Range Set rng = Range(Cells(ActiveCell.Row + 1, 1), Cells(Rows.Count, 1)) rng.SpecialCells(xlCellTypeVisible).Cells(1).Selec t -- Regards Ron de Bruin http://www.rondebruin.nl wrote in message ups.com... How can I program the cursor to do what happens when I press the Down Arrow key, with regard to ignoring hidden rows? If I use [VBA] ActiveCell.Offset(1, 0).Select ...the cursor moves down to the next numerical row, which may be a hidden row. If I use [VBA] SendKeys "{DOWN}" ...it behaves like CTRL+SHIFT+Down Arrow, selecting all the contiguous non-blank cells below the active cell. That's not as advertised, right?? (I have to remember not to execute this statement while in the VBA editor, because from there it just moves the VBA editor's cursor.) This is in Excel 2000. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Move cursor down, skipping hidden rows
Oops
My example will only work in Col A Dim rng As Range Set rng = Range(Cells(ActiveCell.Row + 1, ActiveCell.Column), Cells(Rows.Count, ActiveCell.Column)) rng.SpecialCells(xlCellTypeVisible).Cells(1).Selec t -- Regards Ron de Bruin http://www.rondebruin.nl "Ron de Bruin" wrote in message ... Try this Dim rng As Range Set rng = Range(Cells(ActiveCell.Row + 1, 1), Cells(Rows.Count, 1)) rng.SpecialCells(xlCellTypeVisible).Cells(1).Selec t -- Regards Ron de Bruin http://www.rondebruin.nl wrote in message ups.com... How can I program the cursor to do what happens when I press the Down Arrow key, with regard to ignoring hidden rows? If I use [VBA] ActiveCell.Offset(1, 0).Select ...the cursor moves down to the next numerical row, which may be a hidden row. If I use [VBA] SendKeys "{DOWN}" ...it behaves like CTRL+SHIFT+Down Arrow, selecting all the contiguous non-blank cells below the active cell. That's not as advertised, right?? (I have to remember not to execute this statement while in the VBA editor, because from there it just moves the VBA editor's cursor.) This is in Excel 2000. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Move cursor down, skipping hidden rows
Wow! Nice, thanks!
Dan |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Skipping Rows with cursor | Excel Discussion (Misc queries) | |||
Move cursor 5 rows down | Excel Discussion (Misc queries) | |||
move cursor on one sheet moves cursor on all sheets | Excel Discussion (Misc queries) | |||
Can I paste data skipping the hidden cells ? | Excel Discussion (Misc queries) | |||
HOW TO MOVE CURSOR | Excel Programming |