Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 430
Default Recording macros....record cursor movement not cell address?

Greetings, Just recording a macro to insert a column in the middle of some
data, enter a formula and then copy the formula to cells below (having some
problems with blank rows screwing this up but I'll leave that for another
question). The number of rows in this data will vary, the recorded macro
looks at what cell I move cursor to rather than just going right one cell or
end down. How can I get around this, do I have to record the macro and then
manually edit it to move one cell to right or end down where it has selected
a cell address?

Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Recording macros....record cursor movement not cell address?

Tim,
Have you tried SendKeys
ex
'the following is the same as pressing the down arrow 1 time:
SendKeys "{DOWN}", True
'the following is the same as pressing the down arrow 11 times:
SendKeys "{DOWN 11}", True
'the following will go to the last used cell in the current selected column:
SendKeys "^{END}", True

regards
Mike

"tim m" wrote:

Greetings, Just recording a macro to insert a column in the middle of some
data, enter a formula and then copy the formula to cells below (having some
problems with blank rows screwing this up but I'll leave that for another
question). The number of rows in this data will vary, the recorded macro
looks at what cell I move cursor to rather than just going right one cell or
end down. How can I get around this, do I have to record the macro and then
manually edit it to move one cell to right or end down where it has selected
a cell address?

Thanks.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 430
Default Recording macros....record cursor movement not cell address?

No I haven't tried those, I assume I would record the macro as I had been
doing and then edit it to take out the cell references in there and insert
the send keys lines of code. I'll read up on SendKeys.

Thanks!

"Mike Gallagher" wrote:

Tim,
Have you tried SendKeys
ex
'the following is the same as pressing the down arrow 1 time:
SendKeys "{DOWN}", True
'the following is the same as pressing the down arrow 11 times:
SendKeys "{DOWN 11}", True
'the following will go to the last used cell in the current selected column:
SendKeys "^{END}", True

regards
Mike

"tim m" wrote:

Greetings, Just recording a macro to insert a column in the middle of some
data, enter a formula and then copy the formula to cells below (having some
problems with blank rows screwing this up but I'll leave that for another
question). The number of rows in this data will vary, the recorded macro
looks at what cell I move cursor to rather than just going right one cell or
end down. How can I get around this, do I have to record the macro and then
manually edit it to move one cell to right or end down where it has selected
a cell address?

Thanks.

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
Cursor movement to last cell with same number Steven Excel Discussion (Misc queries) 5 October 8th 09 04:39 PM
How do I disable the cursor movement after hitting enter in a cell Randy R Excel Discussion (Misc queries) 1 September 16th 09 02:30 AM
Movement of cursor L... Excel Worksheet Functions 4 May 6th 06 03:48 AM
How do I make the Stop Recording bar pop up when recording macros J Excel Worksheet Functions 1 January 10th 06 08:46 PM
recording the date when record was entered in cell in Excel mcgoo Excel Worksheet Functions 1 February 10th 05 10:11 PM


All times are GMT +1. The time now is 07:02 PM.

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

About Us

"It's about Microsoft Excel"