ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Moving to a different cell automatically. (https://www.excelbanter.com/excel-programming/334292-moving-different-cell-automatically.html)

Fernandoalberte[_8_]

Moving to a different cell automatically.
 

Guys...can someone please help me i am going crazy.

What i woudl like to do is when someone is in a workbook and they hav
finished entering data into cell a1, as soon as they hit enter i woud
like them to be taken to a cell of my choosing and not to a2 which i
the excel default.

I am sure there is a way to do this...but i just can't figure it out.

Can anyone help me?

thanks

fernand

--
Fernandoalbert
-----------------------------------------------------------------------
Fernandoalberte's Profile: http://www.excelforum.com/member.php...fo&userid=2449
View this thread: http://www.excelforum.com/showthread.php?threadid=38647


Gary Keramidas[_2_]

Moving to a different cell automatically.
 
it works here. i think they forgot a step and not sure if you did it or not.
right click the sheet tab at the bottom. choose view code and then paste in
their code.

--


Gary


"Fernandoalberte"
<Fernandoalberte.1s2dsf_1121184679.9033@excelfor um-nospam.com wrote in
message news:Fernandoalberte.1s2dsf_1121184679.9033@excelf orum-nospam.com...

thank you i ave tried what you have suggested an not much happens.

if i start off with range a1 selected and then hit return to go to a2,
nothing happens...i was expecting it to go to b10.

Am i doing somthing wrong?


--
Fernandoalberte
------------------------------------------------------------------------
Fernandoalberte's Profile:
http://www.excelforum.com/member.php...o&userid=24493
View this thread: http://www.excelforum.com/showthread...hreadid=386474




Piranha[_20_]

Moving to a different cell automatically.
 

Fernando,

This code works fine for me. -- Have you put the code into the "Sheet"
module?
Not in a Regular module or Worksheet module.

Dave

Fernandoalberte Wrote:
thank you i ave tried what you have suggested an not much happens.

if i start off with range a1 selected and then hit return to go to a2,
nothing happens...i was expecting it to go to b10.

Am i doing somthing wrong?
Fernando,
You can use a worksheet_change event handler to do just this.

Right click on the worksheet tab then at the top of the VBA editor
window paste:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target = Range("A1") Then Range("B10").Select
End Sub



--
Piranha
------------------------------------------------------------------------
Piranha's Profile: http://www.excelforum.com/member.php...o&userid=20435
View this thread: http://www.excelforum.com/showthread...hreadid=386474


Bernie Deitrick

Moving to a different cell automatically.
 
Fernando,

With Excel XP or later, you can lock all the cells (Format cells, protection tab) and unlock the
cells that you want to allow the user to edit (let's say, A1 and B10). When you protect the sheet,
choose the option to only allow editing of unlocked cells, and pressing enter will move the cursor
to the next unprotected cell.

HTH,
Bernie
MS Excel MVP


"Fernandoalberte" <Fernandoalberte.1s2dsb_1121184677.8432@excelfor um-nospam.com wrote in message
news:Fernandoalberte.1s2dsb_1121184677.8432@excelf orum-nospam.com...

Guys...can someone please help me i am going crazy.

What i woudl like to do is when someone is in a workbook and they have
finished entering data into cell a1, as soon as they hit enter i woudl
like them to be taken to a cell of my choosing and not to a2 which is
the excel default.

I am sure there is a way to do this...but i just can't figure it out.

Can anyone help me?

thanks

fernando


--
Fernandoalberte
------------------------------------------------------------------------
Fernandoalberte's Profile: http://www.excelforum.com/member.php...o&userid=24493
View this thread: http://www.excelforum.com/showthread...hreadid=386474




bhofsetz[_111_]

Moving to a different cell automatically.
 

Fernando,
The code I proveded is a worksheet_change event and therefore the
contents of A1 would have to be changed from whatever the current value
is for the macro to be triggered (ie. just hitting return won't jump
you to B10).

If you really want to restrict the user to certian cells for data entry
then Bernie's suggestion may be the way to go.

HTH


--
bhofsetz
------------------------------------------------------------------------
bhofsetz's Profile: http://www.excelforum.com/member.php...o&userid=18807
View this thread: http://www.excelforum.com/showthread...hreadid=386474



All times are GMT +1. The time now is 01:03 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com