+ Reply to Thread
Results 1 to 3 of 3

Excel 2007 : Excel Cursor moves down one cell after a click selection

  1. #1
    Registered User
    Join Date
    08-03-2009
    Location
    Atlanta, GA
    MS-Off Ver
    Excel 2007
    Posts
    1

    Unhappy Excel Cursor moves down one cell after a click selection

    I need to know how to stop the Excel Cursor from moving down one cell after a click selection. I turned OFF the cursor move selection after pressing Enter int he Advanced features function under Excel options. But I am NOT using the Enter button, I am using the click feature of the mouse. So how so I stop this from happening??
    I am using a SelectionChange trap in VB to trap the cell location and then if ti is within my cell restraints, I am allowing a calendar to popup and when the date is selected, the cursor should just unactivate in a cell period is what I am ultimately after. I do NOT want the date popup to show up again when the cursor moves down to the next cell at all. Here is my code. I went back to the double click to get the cursor to quit moving around. But I really want to have just one click select liek the commented code does. Cursor movement is the issue here.
    Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)

    If ((Target.Row >= 6 And Target.Column = 7) Or (Target.Row >= 6 And Target.Column = 8) Or (Target.Row >= 6 And Target.Column = 9)) Then
    frmCalendar.Show
    End If
    End Sub

    ' I prefer this code to be used but the cusror moves to the next field when this is used.
    'Private Sub Worksheet_SelectionChange(ByVal Target As Range)

    'If ((ActiveCell.Row >= 6 And ActiveCell.Column = 7) Or (ActiveCell.Row >= 6 And ActiveCell.Column = 8) Or (ActiveCell.Row >= 6 And ActiveCell.Column = 9)) Then
    ' frmCalendar.Show
    'End If
    'End Sub

  2. #2
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: Excel Cursor moves down one cell after a click selection

    Post the code you have for the Calendar click event. The code you've posted doesn't send the cell pointer to another selection so the problem is either with the Calendar click event or, possibly, with your mouse software interpreting a click as an "enter" keystroke.

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

    Re: Excel Cursor moves down one cell after a click selection

    Welcome to the Board, before responding to Palmetto please can I ask you note the below ?

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here

    Thanks in advance,

+ 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