Return cursor to previous position
Thanks Gary's Student.
You're speaking a bit above my level. Is this 2 ways of doing the same thing
or do both the worksheet code bit and the standard module bit have to be done?
Where do I go to enter worksheet code? Is that the X symbol to the left of
"File" right click/View code routine?
Standard module: Is that the modules where macros are recorded into? I've
done quite a bit of manipulation in there with amending copied macros.
"Gary''s Student" wrote:
Hi Kevryl:
You can create this feature within a single sheet:
In worksheet code enter:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Set oldr = r
Set r = Target
End Sub
In a standard module enter:
Public r As Range
Public oldr As Range
Sub goback()
If oldr Is Nothing Then
Else
oldr.Select
End If
End Sub
and assign a shortcut like CNTRL+e to goback. As you either click or arrow
around the sheet, CNTRL+e will return you to the previous selection.
REMEMBER: this will work only within a single sheet.
--
Gary''s Student - gsnu200715
|