View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
davesexcel
 
Posts: n/a
Default Movement of cursor


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