Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Hit Return, Back to B1, etc

2 views
Skip to first unread message

Rentapen

unread,
Jul 8, 2003, 11:08:18 AM7/8/03
to
Hello, again my search syntax of words are failing me. I just wish my users
to enter data to row/column A1 to A10 hit return/tab and the cursor moves to
B1 to start over. I have lists of names starting at A12/B.../C.. etc. which
is input in earlier row/columns. I also have hidden list farther over. Its
seems simple, I just need a search word to start.

Just Wandering
rentapen

Jerry W. Lewis

unread,
Jul 9, 2003, 7:27:46 AM7/9/03
to
- Tools|Macro|Visual Basic Editor
- Toward the upper left you will see the Project Explorer (default label
is "Project - VBA Project"). In the Project Explorer locate your
workbook, and the appropriate sheet under the workbook. Double click on
the sheet.
- On the worksheet code page that appeared when you doubled clicked,
insert the following code

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Row = 11 Then
Cells(1, Target.Column + 1).Select
End If
End Sub

On that sheet, whenever a cell in row 11 would be selected (as when the
user presses enter from row 10), then the first row in the next column
will be selected instead.

Jerry

Rentapen

unread,
Jul 9, 2003, 9:22:50 AM7/9/03
to
Thanks Jerry, I knew I was getting close, but I screwed up. My data is going
across columns, A4 to L4, then back to A5 to L5. I tried changing the
target. but it doen't seem to work. Also when I go to save it wants to
assign a macro name in a new module?
thanks again, I'll search the sel-change help.

just wandering
rentapen


Jerry W. Lewis <post_a_reply@no_e-mail.com> wrote in message
news:3F0BFCFF.2060509@no_e-mail.com...

Rentapen

unread,
Jul 9, 2003, 11:45:47 AM7/9/03
to
Update: After awhile I came up with this.


Private Sub Worksheet_SelectionChange(ByVal Target As Range)

With ActiveWindow
If Not Application.Intersect(Target, Range("m4:m300")) Is Nothing Then
Cells(ActiveCell.Row, 1).Select

End If
End With
End Sub

It goes to the end of my row and returns. But to the start of the same row.
Thats ok but a shift down one row would be nice.

just wandering
rent

Rentapen <rent...@yahoo.com> wrote in message
news:KGUOa.2724$Yk4....@newssvr17.news.prodigy.com...

Rentapen

unread,
Jul 9, 2003, 11:02:29 PM7/9/03
to
New update.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
With ActiveWindow

If Target.Column > 12 Then
ActiveCell.Offset(1, 1 - Target.Column).Select


End If
End With
End Sub

This works fine for my app.

rent


Rentapen <rent...@yahoo.com> wrote in message

news:LMWOa.591$GB...@newssvr33.news.prodigy.com...

0 new messages