Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default 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!




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default 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
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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How insert a dash in the third position of a column with data? warren Excel Discussion (Misc queries) 1 July 19th 06 09:42 PM
excel limit data entry range, control cursor movement to 2 cols Bob Excel Programming 4 September 23rd 05 05:14 PM
Cursor position saziz Excel Discussion (Misc queries) 2 August 9th 05 08:19 PM
Cursor Position in VBE ehntd[_5_] Excel Programming 0 November 3rd 04 08:44 AM
cursor position Fan Fan Excel Programming 3 August 14th 04 01:12 AM


All times are GMT +1. The time now is 10:43 AM.

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"