Force range select when enter key pressed

pacoonejr

Board Regular
Joined
Apr 19, 2003
Messages
138
Howdy all,

I have a sheet that is locked except for 1 cell. you enter a value and every thing changes. now when they enter the value i want the curser back in cell A1. I just cant figure this out.

Thanks,
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
If that one cell were (for example) D50, you might try:
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$D$50" Then [A1].Select
End Sub
You will need to incorporate this into the existing worksheet change event if that's what you're using to make all the other changes. If those happen purely through formula calculations, then this is all you should need in the sheet module.

Hope it helps,
Dan
 
Upvote 0
Hi,

Just another option to play with, you could lock all cells and using the Control Toolbox, select the whole sheet and set the "EnableSelection" option to "1 - xlUnlockedCells" only and then reprotect the sheet, the cursor won't be able to move from there then.

John
 
Upvote 0

Forum statistics

Threads
1,214,426
Messages
6,119,411
Members
448,894
Latest member
spenstar

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
Back
Top