Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2004
    Location
    Minnesota, USA, Earth
    Posts
    65

    Unanswered: VBA code for disable "Move selection after Enter"

    Hi,

    I have a feeling that this is really easy, but I'm not sure exactly how to proceed.

    For a single Excel file, I would like to disable "Move Selection After Enter" (see Tools>Options>Edit tab). However, I want this to be in effect for this one file only, and I would like all other open Excel files to be unaffected.

    Is there a way to do this?

    Thanks!
    -Mike

  2. #2
    Join Date
    Jan 2004
    Location
    Aberdeen, Scotland
    Posts
    1,067
    Hi Mike

    If you put the code

    Application.MoveAfterReturn = False

    Into the Workbook_Open Event and the Workbook_Activate Event
    And then put

    Application.MoveAfterReturn = True

    Into the Workbook_BeforeClose and Workbook_Deactivate Events
    This should let you restrict the behaviour to the one workbook

    HTH
    David

  3. #3
    Join Date
    Mar 2004
    Location
    Minnesota, USA, Earth
    Posts
    65

    Thanks!

    Thanks! It works great!

Posting Permissions

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