Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2009
    Posts
    2

    Unanswered: Problem with Move Selection After Enter

    I expect this is probably an easy one to sort out......but it's got me stuck!

    I have a sheet with a macro that protects and unprotects depending on what's happening on the sheet.

    For some reason the cell selection moves whenever I hit return. The problem is, when I look at Options, the "Move Selection After Enter" is off! Now if I unprotect the sheet, the cell selection stops moving when I hit return.

    In a nutshell, the "Move Selection After Enter" is set to off, but when the sheet is protected, the selection still occurs after hitting return. When the sheet is unprotected, everything is ok!!

  2. #2
    Join Date
    Apr 2004
    Location
    Derbyshire, UK
    Posts
    789
    Provided Answers: 1
    Quote Originally Posted by ptkirnig
    I expect this is probably an easy one to sort out......but it's got me stuck!

    I have a sheet with a macro that protects and unprotects depending on what's happening on the sheet.

    For some reason the cell selection moves whenever I hit return. The problem is, when I look at Options, the "Move Selection After Enter" is off! Now if I unprotect the sheet, the cell selection stops moving when I hit return.

    In a nutshell, the "Move Selection After Enter" is set to off, but when the sheet is protected, the selection still occurs after hitting return. When the sheet is unprotected, everything is ok!!
    Hi

    I think you need to make sure that 'Select Locked Cells' is ticked (or the VBA equivelant) when you protect the sheet.

    ie like
    Code:
    ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
    ActiveSheet.EnableSelection = xlNoRestrictions
    or similar

    MTB

  3. #3
    Join Date
    Aug 2009
    Posts
    2
    Mike
    Thanks for that, I think you are probably right. I should say now that I got so frustrated with the problem, I am now using a form to control input onto the worksheet!!
    Thanks anyway.
    Paul

Posting Permissions

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