New row always on top

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

Guest

I used an Excel spreadsheet to track my daily notes. 1st column is the date,
next is the company or the person I've spoken to and column 3 is the
corresponding notes.

I would like to have an new row pop up under my headings each time I finish
an entry.

Does anybody know how that may be set up?

Thank you,

Denise
 
Private Sub Worksheet_Change(ByVal Target As Range)
Const WS_RANGE As String = "C2" '<== change to suit

On Error GoTo ws_exit
Application.EnableEvents = False

If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
With Target
Me.Rows(2).Insert
End With
End If

ws_exit:
Application.EnableEvents = True
End Sub

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.


--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
Thank you for the quick response Bob. However; the message is a bit coded and
I don't think I understand what you are instructing me to do.

Forgive me but, could you please provide clearer intructions as to what I
need to do?

Thank you,

deniseH
 
Denise,

the instructions are included after the code.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
Wow, what a learning experience. An IT person helped me with your
instructions and it works!! Thank you so much for your help!
 
Denise,

That was my standard set of instructions. What was unclear with it, help me
to make it better?

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
Back
Top