Changing Behavior of the <Enter> Key?

  • Thread starter Thread starter DCSwearingen
  • Start date Start date
D

DCSwearingen

I have a spreadsheet that is locked, with certain cells that ar
unlocked for operator entry.

In a locked spreadsheet, pressing the <Tab> key will move the focus t
the next unlocked cell.
:confused:
Is there a macro that will change the behavior of the <Enter> key t
mimick the behavior of the <Tab> key in this scenario
 
You would need to create two macros.

1)If you want this to happen automatically when the workbook is open, place
the first macro in ThisWorkbook of Personal.xls or the relevant workbook :

Private Sub Workbook_Open()
Application.OnKey "~", "TabPgm"
End Sub

2)Then in a regular module :

Public Sub TabPgm()
SendKeys "{TAB}"

End Sub
 
You can certailnly do this with Excel 2003 onwards, I'm not sure abou
Excel 2002, I know you can't do it with Excel 2000 and earlier.

With Excel 2003, when you protect a document, you get an option of wha
you want to protect, two of the options are Select locked cells an
Select unlocked cells, make sure that the first is unchecked and th
second is checked. You then achieve, your objectiv
 
Many Thanks Patricia!!

This worked beautifully. I know the operators will appreciate the
change as they originally asked if it were possible.

A generic "Thank You" goes out to everyone who responds to the
questions posted. I know I read a lot of questions that peak my
interest and mentally file the suggested solutions for future
reference.
 
Thanks for letting me know. I'm glad it worked.
I'm also glad Gary gave additional info for those for whom my method
wouldn't work.
 
Back
Top