Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Loretta Carpenter   on Oct 31 In MS Office Category.

  
Question Answered By: Lee Butler   on Oct 31

You haven't commented on the code  you're getting, and you haven't said which
version of Excel you're using.

I've just tried it (Excel 2003) and do see a difference between absolute  and
relative:

- the xlLastCell move is the same in both modes - specifically
ActiveCell.SpecialCells(xlLastCell).Select;

- the left  move becomes an absolute location selection in absolute mode, but
is an Offset call to move the appropriate number of columns in relative
mode - specifically ActiveCell.Offset(0, -1).Range("A1").Select - which
moves one cell  to the left of wherever you are;

- the ctrl-shift-up is the same in both modes - specifically
Selection.End(xlUp).Select.

So, this key sequence  appears to be recorded correctly  in relative  mode, and
should cope with extra rows as they are created.

One point though ... "<ctrl><shift><up> 'highlights from #2 to the first
cell'". This description is not technically accurate and could possibly be
leading to trouble. Ctrl-Up will stop on a blank/non-blank boundary. It'll
only take you to the first cell if all the cells in the area it's traversing
are empty or all the cells are non-empty.

Anyway. Record it again in relative mode and post the code it generates.
Also indicate what it's doing wrong.

Share: 

 

This Question has 6 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on keypress shortcuts Or get search suggestion and latest updates.


Tagged: