tab order

rsrc1147

Board Regular
Joined
Jul 9, 2002
Messages
100
I am sure that this has been asked before but I can't find it on the pages;

Is it possbile to mkae excel jump to a set cell when someone presses enter? eg, if someone types in a fgure in cell A1, is it possible for them to go straight to, say, C12 when they press enter or tab or whatever? This isn't particularly urgent, it's just really bugging me now. Cheers Ears
 

Some videos you may like

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.

NateO

Legend
Joined
Feb 17, 2002
Messages
9,700
Howdy rsrc1147, a worksheet_change event is of particular use for this type of operation:

<pre>
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, [a1]) Is Nothing Then [c12].Activate
End Sub</pre>

Right-click on your sheet tab, click view code, and paste the above procedure in the now opened worksheet module.
 

rsrc1147

Board Regular
Joined
Jul 9, 2002
Messages
100
Thankyou Very much, a weight has been lifter off my otherwise lithe shoulders.
 

rsrc1147

Board Regular
Joined
Jul 9, 2002
Messages
100
Errr, actually I hat to say this but it's not doing anything. I have pasted it the code and made sure it says Worksheet Change at the top but nothing is happening when I go back onto the sheet. I hate to sound thick but is there like an 'on' button or something I need to press? Thanks, I am sorry about my ineptness.
 

NateO

Legend
Joined
Feb 17, 2002
Messages
9,700

ADVERTISEMENT

Hello, two things, you must be in the worksheet that you pasted the code in (its module as described above). And the code must look exactly as it does above, inclucding: byval target as range.

_________________
Cheers,<font size=+2><font color="red"> Nate<font color="blue"> Oliver</font></font></font>
This message was edited by NateO on 2002-11-06 19:51
 

NateO

Legend
Joined
Feb 17, 2002
Messages
9,700
And it only works for a1 (as written), you can change the [a1] to the range of your choice, e.g., [b10:z100]

_________________
Cheers,<font size=+2><font color="red"> Nate<font color="blue"> Oliver</font></font></font>
This message was edited by NateO on 2002-11-06 19:52
 

Watch MrExcel Video

Forum statistics

Threads
1,127,484
Messages
5,625,028
Members
416,065
Latest member
meiravmeron

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top