Good Morning!
Newbie here getting tired of the fight! I'm having a problem with
attempting to offset 1 cell to the right.
I've created a Loop Until statement based on a selectionchange, with If..
Then.. statement enclosed within the loop. My "Then" statements instructs a
value to be inserted in the cell to the right upon SelectionChange. This
part works well, however the curser remains in the cell where it just enter
the "Then" text. I want the curser to move one more cell to the right so the
user can continue with their data entry.
When I add "ActiveCell.Offset (0,1).select" either within the loop statement
or after it, my curser jumps WAY over (e.g. from column "H" to something like
"IU". A little excessive in my opinion!
I'm sure the computer is doing exactly what I'm telling it to do, however
that is not what I want it to do :)
Any help would be appreciated.
JJ
Tom Ogilvy - 24 May 2007 13:46 GMT
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
On error goto Errhandler
Application.EnableEvents = False
' your current code
errhandler:
Application.EnableEvents = True
End Sub
you are recursively calling the selectionchange event by changing the
selection within the event.
this should fix it.

Signature
Regards,
Tom Ogilvy
> Good Morning!
>
[quoted text clipped - 18 lines]
>
> JJ
Joel - 24 May 2007 13:50 GMT
You don't have to select a cell to read the value.
cellvalue = ActiveCell.Offset (0,1).value
> Private Sub Worksheet_SelectionChange(ByVal Target As Range)
> On error goto Errhandler
[quoted text clipped - 33 lines]
> >
> > JJ