+ Reply to Thread
Results 1 to 3 of 3

"Move after Enter" in protected sheet

Hybrid View

  1. #1
    Registered User
    Join Date
    11-07-2009
    Location
    Jersey shore, USA
    MS-Off Ver
    Excel 2003
    Posts
    6

    "Move after Enter" in protected sheet

    I have a spreadsheet where only certain cells are to be edited by he user. After editing a cell I don't want the cursor to move.

    option/edit/move selection after enter is unchecked. All works as expected.

    I protect the sheet using options "select unprotected cells" is true, "Selected protected cells" is false. This seems to override the "move selection" turned off property. The option box does not work when unchecked.

    I have searched the general forum and programming forum and see no cure for this. I tried a one line macro "Application.MoveAfterReturn = False" thinking if I set it programmatically, it will work. It does not. Is there a few lines of code that I could add to a ThisWorkbook macro that would reocord the current cursor location and set location to it after hitting enter? Or possibly an even simpler solution that I'm overlooking?
    Last edited by wdonovan; 12-06-2009 at 11:41 AM. Reason: solved. thank you

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: "Move after Enter" in protected sheet

    If you want run bit of code to apply to all worksheets in the workbook wherein protection is in place then you could use the below in ThisWorkbook

    Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
    If Sh.ProtectDrawingObjects Then Target.Select
    End Sub
    the above assumes all unprotected cells on protected sheets are populated manually (not by formulae) ... on unprotected sheets your standard Move After Selection options would apply whatever they may be.

  3. #3
    Registered User
    Join Date
    11-07-2009
    Location
    Jersey shore, USA
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: "Move after Enter" in protected sheet

    Thank you. I have no idea why his works but it does. Not very intuitive is it?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1