Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Automating Data Entry (Position the cursor, insert row)
I have a very simple spreadsheet I'm using to collect data for establishing
metrics. The spreadsheet is only 4 columns (one for the date, two that are validated using drown-down lists, and the last is a text column for description/comments). I'd like to automate it so that when the user presses enter when in the last column in the row (D), 1) the focus is returned to the first column in the same row, and 2) a new row is inserted above thus placing the cursor in the first column of the new row, i.e., ready for user input. I understnad the logic for making it happen but don't have the slightest idea of how to actually make it happen. Can anyone help? Thanks! |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Automating Data Entry (Position the cursor, insert row)
Don,
Thanks for the code snippet - I'm getting a syntax error, though. It seems to be bombing on the "..Select" line. Any ideas? "Don Guillett" wrote: Right click sheet tabview codeinsert this. Now when you make an entry in column D the macro will fire. Private Sub Worksheet_Change(ByVal Target As Range) If Target.Column < 4 Then Exit Sub With Cells(Target.Row, 1) ..Select ..EntireRow.Insert End With End Sub -- Don Guillett SalesAid Software "Bethany" wrote in message ... I have a very simple spreadsheet I'm using to collect data for establishing metrics. The spreadsheet is only 4 columns (one for the date, two that are validated using drown-down lists, and the last is a text column for description/comments). I'd like to automate it so that when the user presses enter when in the last column in the row (D), 1) the focus is returned to the first column in the same row, and 2) a new row is inserted above thus placing the cursor in the first column of the new row, i.e., ready for user input. I understnad the logic for making it happen but don't have the slightest idea of how to actually make it happen. Can anyone help? Thanks! |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Automating Data Entry (Position the cursor, insert row)
It's not two dots
... it is ONE dot .. -- Don Guillett SalesAid Software "Bethany" wrote in message ... Don, Thanks for the code snippet - I'm getting a syntax error, though. It seems to be bombing on the "..Select" line. Any ideas? "Don Guillett" wrote: Right click sheet tabview codeinsert this. Now when you make an entry in column D the macro will fire. Private Sub Worksheet_Change(ByVal Target As Range) If Target.Column < 4 Then Exit Sub With Cells(Target.Row, 1) ..Select ..EntireRow.Insert End With End Sub -- Don Guillett SalesAid Software "Bethany" wrote in message ... I have a very simple spreadsheet I'm using to collect data for establishing metrics. The spreadsheet is only 4 columns (one for the date, two that are validated using drown-down lists, and the last is a text column for description/comments). I'd like to automate it so that when the user presses enter when in the last column in the row (D), 1) the focus is returned to the first column in the same row, and 2) a new row is inserted above thus placing the cursor in the first column of the new row, i.e., ready for user input. I understnad the logic for making it happen but don't have the slightest idea of how to actually make it happen. Can anyone help? Thanks! |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Automating Data Entry (Position the cursor, insert row)
Don,
Thanks! That did it! I really need to learn VBA - I just never seem to have the time! Thanks, again "Don Guillett" wrote: It's not two dots ... it is ONE dot .. -- Don Guillett SalesAid Software "Bethany" wrote in message ... Don, Thanks for the code snippet - I'm getting a syntax error, though. It seems to be bombing on the "..Select" line. Any ideas? "Don Guillett" wrote: Right click sheet tabview codeinsert this. Now when you make an entry in column D the macro will fire. Private Sub Worksheet_Change(ByVal Target As Range) If Target.Column < 4 Then Exit Sub With Cells(Target.Row, 1) ..Select ..EntireRow.Insert End With End Sub -- Don Guillett SalesAid Software "Bethany" wrote in message ... I have a very simple spreadsheet I'm using to collect data for establishing metrics. The spreadsheet is only 4 columns (one for the date, two that are validated using drown-down lists, and the last is a text column for description/comments). I'd like to automate it so that when the user presses enter when in the last column in the row (D), 1) the focus is returned to the first column in the same row, and 2) a new row is inserted above thus placing the cursor in the first column of the new row, i.e., ready for user input. I understnad the logic for making it happen but don't have the slightest idea of how to actually make it happen. Can anyone help? Thanks! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How insert a dash in the third position of a column with data? | Excel Discussion (Misc queries) | |||
excel limit data entry range, control cursor movement to 2 cols | Excel Programming | |||
Cursor position | Excel Discussion (Misc queries) | |||
Cursor Position in VBE | Excel Programming | |||
cursor position | Excel Programming |