Right click on sheet tab, select View Code and paste this code at the
flashing cursor.
As written the macro will move the cursor down one cell form the current
position.
Sub OffsetSelectedCell()
'Replace r & c below as required
r = 1 ' 0 = stay put, 1 = down 1, -1 = up 1
c = 0 ' 0 = stay put, 1 = right 1, -1 = left 1
ActiveCell.Offset(rowOffset:=r, columnOffset:=c).Activate
End Sub
--
Ian
--
"Ross" wrote in message
...
Hi,
I don't know how to write macros, I only create them by recording them.
I would like to know how I tell the cursor to move cells to right, left,
or up and down, from a cell, so that when I run the macro, the movent will
happen from the current selected cell.
Also, I am trying to create a spreadsheet that I can paste lyrcs to a song
into, and then having a series of text box buttons I create -- each with
the name of a chord, like Am or b7 as the text in it. Each one of these
would be assigned a macro. I want to be able to click above a cell above
the particular line of lyric, and then go and click on the text box
associated with the chord I want and have that cord pop into selected
cell. I would format all the columns as one cell wide. I did this and
when I paste in the lyracs, say starting at A1, the lyrcis are displayed
across the page, even though they are all in the first cells. of column A.
(I doulbe space the lyrics before I paste them in, leaving a row of single
spaced cells above each line, in which to put my chords) Is that doable?
|