Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.setup
|
|||
|
|||
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
Posted to microsoft.public.excel.setup
|
|||
|
|||
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
Posted to microsoft.public.excel.setup
|
|||
|
|||
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
Posted to microsoft.public.excel.setup
|
|||
|
|||
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
Posted to microsoft.public.excel.setup
|
|||
|
|||
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
Posted to microsoft.public.excel.setup
|
|||
|
|||
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 |
Display Modes | |
|
|