Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 23
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pivot Table Error Message - "Command Text not set for command obje Jeff Divian Excel Discussion (Misc queries) 0 November 7th 07 10:26 PM
excel-how to get the spreadsheet to move as I move the scroll tab excel toiler Excel Discussion (Misc queries) 6 November 7th 07 06:07 PM
VISUAL BASIC COMMAND TO MOVE CURSER DOWN ONE CELL Moving Problem! Excel Worksheet Functions 2 December 19th 06 08:00 AM
When I move scroll bar in excell the contents do not move with it ramneek Excel Discussion (Misc queries) 2 June 29th 05 07:35 PM
command button in excel will move when print. [email protected] Excel Discussion (Misc queries) 1 December 29th 04 03:53 PM


All times are GMT +1. The time now is 11:43 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"