Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
VB command to move down one row
Hiya,
I've just found this code & it works perfectly for me as is, but just as a point of understanding & learning, the bit at the end: Range("A1").Select Why is this needed? Looking at it, it makes me think that cell A1 will be selected again, which of course it isn't, so what does it do? Thanks merry_fay "Debra Dalgleish" wrote: When you record a macro, turn on Relative Reference to record cell selection by position, instead of a specific cell address. For example, select cell D2, and start recording. Press the Relative Reference button on the Stop Recording toolbar Press the down arrow key Turn off Relative Reference, and stop recording The resulting code is: ActiveCell.Offset(1, 0).Range("A1").Select When you run this code, it will move one cell down from whatever is the active cell. -- Debra Dalgleish Excel FAQ, Tips & Book List http://www.contextures.com/tiptech.html " wrote: Help! Is there a command to move down one row regardless of where you are in the spreadsheet? When I use the autorecord, VB selects a specific cell. Using Selection.End(xlDown).Select sequentially drops it all the way to the last two. Help! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Pivot Table Error Message - "Command Text not set for command obje | Excel Discussion (Misc queries) | |||
excel-how to get the spreadsheet to move as I move the scroll tab | Excel Discussion (Misc queries) | |||
VISUAL BASIC COMMAND TO MOVE CURSER DOWN ONE CELL | Excel Worksheet Functions | |||
When I move scroll bar in excell the contents do not move with it | Excel Discussion (Misc queries) | |||
command button in excel will move when print. | Excel Discussion (Misc queries) |