New row always on top

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
 
B

Bob Phillips

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)
 
G

Guest

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
 
B

Bob Phillips

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)
 
G

Guest

Wow, what a learning experience. An IT person helped me with your
instructions and it works!! Thank you so much for your help!
 
B

Bob Phillips

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)
 

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