Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Tom,
Dim myOrigSelection As Range Set myOrigSelection = Selection 'Other Code 'To go back myOrigSelection.Select HTH, Bernie MS Excel MVP "Tom" wrote in message ... 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 |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 Tom wrote: 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 -- Dave Peterson |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
My thanks to Bernie and Dave. Your assistance is much appreciated.
Tom "Tom" wrote in message ... 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
My excel macro recorder no longer shows up when recording macro | Excel Discussion (Misc queries) | |||
My excel macro recorder no longer shows up when recording macro | Excel Discussion (Misc queries) | |||
using a cell value to control a counter inside a macro and displaying macro value | Excel Worksheet Functions | |||
Macro needed to Paste Values and prevent Macro operation | Excel Discussion (Misc queries) |