+ Reply to Thread
Results 1 to 7 of 7

remove cursor selection

Hybrid View

  1. #1
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    remove cursor selection

    Hi to all,
    is this possible?:

    example I write in G15 and must remain in G15
    partially works with Target.Select
    This doesn't have to happen
    I write in G15, for example, I move to G16 with the arrow and immediately returns to G15

    Option Explicit
    
    
    Private Sub Worksheet_Change(ByVal Target As Range)
    
    ActiveSheet.Unprotect "123456"
    
    Application.EnableEvents = False
    Application.ScreenUpdating = False
                      
    '-------------------------------------------------------------
    
      ActiveSheet.Range("H9:H23").Copy
      ActiveSheet.Range("L9:L23").PasteSpecial Paste:=xlPasteValues
      
      Application.CutCopyMode = True
    
      'ActiveCell.Select
      Target.Select
      
    '-------------------------------------------------------------
        
    Application.EnableEvents = True
    Application.ScreenUpdating = True
    
    'ActiveSheet.Protect "123456"
    
    End Sub
    I hope I have explained
    max
    Attached Files Attached Files
    Last edited by max_max; 10-06-2020 at 12:06 PM.

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: remove cursor selection

    Sub Test()
    Application.OnKey "{Right}", ""
    Application.OnKey "{Left}", ""
    Application.OnKey "{Down}", ""
    Application.OnKey "{Up}", ""
    End Sub
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: remove cursor selection

    Hi mehmetcik
    where it goes in the macro?

  4. #4
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: remove cursor selection

    Sorry.

    Place the code in a normal Macro module.

    Run the Macro and then try entering some data

  5. #5
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: remove cursor selection

    I tried as you say, if I did exactly but it does not go
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: remove cursor selection

    Try this version.

    The Macro runs automatically

    
    Option Explicit
    
    Sub Auto_Open()
    Application.OnKey "{Right}", ""
    Application.OnKey "{Left}", ""
    Application.OnKey "{Down}", ""
    Application.OnKey "{Up}", ""
    End Sub
    Attached Files Attached Files

  7. #7
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: remove cursor selection

    but now the arrows no longer work

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Cursor moves after selection
    By adbrad in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-30-2015, 09:00 AM
  2. Replies: 2
    Last Post: 09-12-2010, 08:44 PM
  3. Replies: 2
    Last Post: 08-03-2009, 04:34 PM
  4. Cursor Selection Changes ???
    By Pylie in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-27-2007, 06:08 PM
  5. cursor moves view instead of selection
    By Nigel in forum Excel General
    Replies: 2
    Last Post: 08-13-2006, 04:45 PM
  6. cursor behavious when restricting selection to unlocked cells
    By kaininito in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-01-2005, 03:05 PM
  7. [SOLVED] Changing active selection cursor
    By Mistaken Creation in forum Excel General
    Replies: 3
    Last Post: 05-27-2005, 06:05 PM

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