Simple macro - help please!!

M

Micheal

Hey,

How would I write a simple VBA macro to carry out the
following:

1 Select a cell
2 Double click it - or edit the contents (without making
any changes however)
3 move to cell directly below
4 Double click etc?

Cheers

Mick
 
J

John Wilson

Mick,

Right click on the sheet tab of the sheet that you want this to work on
and copy/paste the following:

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
ActiveCell.Offset(1, 0).Select
End Sub

The above will move to the cell below the selected cell on a double
click.

As for moving to the cell below after an edit, try:
Tools/Options/Edit
Check the box "Move Selection After Enter"
and select "Down"

John
 
C

Cliff Myers

Just Click on the record macro button, give it a name and then do what you
need, then click stop recording.

HTH
 

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