Macros

  • Thread starter Thread starter Rachel
  • Start date Start date
R

Rachel

I am having a problem when recording macros. In order for the stop recording
button to become active I must hit enter or otherwise get out of the cell I
recorded the macro in. Therefore, when I go elsewhere in the sheet and play
the macro, at the end it always takes my cursor to the cell where I ended
when recording. What I want to accomplish is having the cursor advance to
the cell to the right of the one I've played the macro in each time, not
returning to the same static cell regardless of where I played the macro.
Anyone know what I'm doing wrong? Please advise. Thank you.
 
Open up your VB editor (Alt+F11), and using the project window (top left
usually) find the module that contains your macro that you recorded. Near the
end, you'll probably see something like

Range("F6").Select

right after performing the actual operation you want accomplished. To select
the cell one to the right of wherever you are currently, replace that line
with this one:

activecell.Offset(0,1).Select
 
Back
Top