+ Reply to Thread
Results 1 to 5 of 5

Movement of cursor

  1. #1
    L...
    Guest

    Movement of cursor

    Have a spread sheet with several columns(14).
    Would like be able to hit a key (i.e. Enter) to return to next row and back
    to column #1.

    thanks,

    L.



  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,475
    I was thinking of a worksheet change event but this would only work if you made a change in a cell so how about a right click event
    when the user right clicks on the mouse he will be returned to column A one row down

    this code goes into the worksheet module

    Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As Boolean)
    If Union(Range("$A:$N"), Target).Address = Range("$A:$N").Address Then

    Application.SendKeys "{home}"
    ActiveCell.Offset(1, 0).Range("A1").Select
    Cancel = True
    End If
    End Sub

  3. #3
    R..VENKATARAMAN
    Guest

    Re: Movement of cursor

    create a command button and put this code in that
    Private Sub CommandButton1_Click()
    Cells((ActiveCell.Row) + 1, "a").Select
    End Sub
    try this.



    "L..." <[email protected]> wrote in message
    news:[email protected]...
    > Have a spread sheet with several columns(14).
    > Would like be able to hit a key (i.e. Enter) to return to next row and
    > back to column #1.
    >
    > thanks,
    >
    > L.
    >
    >




  4. #4
    David McRitchie
    Guest

    Re: Movement of cursor

    Hi L....,

    So this is where you came after forsaking excel.setup.

    You can use Sheet protection, or you can
    use a Selection Event macro.

    Worksheet_SelectionChange to prevent entry past a column
    http://www.mvps.org/dmcritchie/excel/event.htm#ws_sc
    ---
    HTH,
    David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
    My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
    Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

    "davesexcel" <[email protected]> wrote in message
    news:[email protected]...
    >
    > I was thinking of a worksheet change event but this would only work if
    > you made a change in a cell so how about a right click event
    > when the user right clicks on the mouse he will be returned to column A
    > one row down
    >
    > this code goes into the worksheet module
    >
    > Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As
    > Boolean)
    > If Union(Range("$A:$N"), Target).Address = Range("$A:$N").Address Then
    >
    > Application.SendKeys "{home}"
    > ActiveCell.Offset(1, 0).Range("A1").Select
    > Cancel = True
    > End If
    > End Sub
    >
    >
    > --
    > davesexcel
    >
    >
    > ------------------------------------------------------------------------
    > davesexcel's Profile: http://www.excelforum.com/member.php...o&userid=31708
    > View this thread: http://www.excelforum.com/showthread...hreadid=538718
    >





  5. #5
    L...
    Guest

    Re: Movement of cursor

    Thanks for the suggestions.

    L.

    "R..VENKATARAMAN" <[email protected]> wrote in message
    news:[email protected]...
    > create a command button and put this code in that
    > Private Sub CommandButton1_Click()
    > Cells((ActiveCell.Row) + 1, "a").Select
    > End Sub
    > try this.
    >
    >
    >
    > "L..." <[email protected]> wrote in message
    > news:[email protected]...
    >> Have a spread sheet with several columns(14).
    >> Would like be able to hit a key (i.e. Enter) to return to next row and
    >> back to column #1.
    >>
    >> thanks,
    >>
    >> L.
    >>
    >>

    >
    >




+ 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