Need to insert row with enter key

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

My boss is not very computer literate and in order for him to use the
spreadsheet I created for tracking jobs, he "must" be able to insert a row by
hitting the enter key. Basically, he wants to just type on a line, hit
enter, and be on the next line to type something -- like Word does. Any
ideas??
 
piece of cake. Just put it in a worksheet_change event. Right click sheet
tab>view code>insert this>modify to suit>SAVE . Now when you change
something in col A a row will be inserted moving that data down one leaving
you the same row on which to type again.

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Row < 2 Or Target.Column <> 1 Then Exit Sub
Rows(Target.Row).Insert

End Sub
 
If you mean a new line in the same cell tell him to use Alt + Enter otherwise
enter should go to the cell under is it is selected under tools>options>edit
and move selection after enter down

Regards,

Peo Sjoblom
 
I'm not a VBS coder but understand inserting your code. Could you tell me
what exactly I need to modify in that code to make it work with mine?
 
I thought it was pretty self-explanatory. Read it again and try it....
 
Didn't work for me yesterday so thought I missed something. Working today
though! Thanks for your help.
 
I take it back, it's not working correctly. Pressing enter causes it to
instert over 200 rows instead of just one. I pasted your formula exactly as
you wrote it. Can you help?
 
I just re-tested in xl2002 with the code in a worksheet module (not a
regular module and not ThisWorkbook). When I enter anything in col A a row
is inserted.......
 

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

Back
Top