Macros

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.
 
L

Luke M

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top