#1   Report Post  
Posted to microsoft.public.excel.setup
external usenet poster
 
Posts: 7
Default New row always on top

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
  #2   Report Post  
Posted to microsoft.public.excel.setup
external usenet poster
 
Posts: 10,593
Default New row always on top

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)

"deniseH" wrote in message
...
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



  #3   Report Post  
Posted to microsoft.public.excel.setup
external usenet poster
 
Posts: 7
Default New row always on top

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

"Bob Phillips" wrote:

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)

"deniseH" wrote in message
...
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




  #4   Report Post  
Posted to microsoft.public.excel.setup
external usenet poster
 
Posts: 10,593
Default New row always on top

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)

"deniseH" wrote in message
...
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

"Bob Phillips" wrote:

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)

"deniseH" wrote in message
...
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






  #5   Report Post  
Posted to microsoft.public.excel.setup
external usenet poster
 
Posts: 7
Default New row always on top

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

"Bob Phillips" wrote:

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)

"deniseH" wrote in message
...
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

"Bob Phillips" wrote:

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)

"deniseH" wrote in message
...
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








  #6   Report Post  
Posted to microsoft.public.excel.setup
external usenet poster
 
Posts: 10,593
Default New row always on top

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)

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

"Bob Phillips" wrote:

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)

"deniseH" wrote in message
...
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

"Bob Phillips" wrote:

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)

"deniseH" wrote in message
...
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








Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 05:02 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"