Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cell activation upon "Enter" 1

Status
Not open for further replies.

WaterSprite

Technical User
Mar 23, 2004
69
US
I would like to activate a cell upon entering data into a cell. The equivilant of enter data, move two cells to the right, enter data, two cells to the right, etc.
I tried this:

private Sub worksheet_selection change byvalue(target as Range)
Activecell.Offset(0,2).activate
end sub

it worked, but the activecell ended up in column IV, not a couple of columns over from where I entered data.


 

Hi,

but the activecell ended up in column IV

Can you figure out why? You used the SelectionChange event. Well, the first SelectionChange selected another cell and THAT caused a SelectionChange and so on, until it hit the right edge of the sheet and "ran out of steam" so to speak.

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
   Target.Offset(0,2).select
End Sub


Skip,
[glasses]Don't let the Diatribe...
talk you to death![tongue]

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Skip,thanks for the help.
I don't use the worksheets code very much, I am used to writing macros in a module and controlling things from there.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top