Help with macro

  • Thread starter Thread starter Tom
  • Start date Start date
T

Tom

The last line of my code reads, "Selection.End(xlDown).Select", which is my
reference position on the spreadsheet. Then the macro carries out other
tasks moving the active cell elsewhere. How can I get back to my reference
position? I can't use define to fix that position as this location is
different when the macro is used on other spreadsheets. Thanks for any help.

TIA
Tom
 
Tom,

Dim myOrigSelection As Range


Set myOrigSelection = Selection

'Other Code

'To go back
myOrigSelection.Select

HTH,
Bernie
MS Excel MVP
 
Dim ActCell as Range
'start by saving the current activecell
set actcell = activecell
'do as much as you want
'go back to that original activecell
application.goto actcell ', scroll:=true
 
Back
Top