ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Go back to where you were before the Macro (https://www.excelbanter.com/excel-discussion-misc-queries/80353-go-back-where-you-were-before-macro.html)

Trintrin

Go back to where you were before the Macro
 

can anyone tell me how to edit a macro so that it takes you back to
where you were before you hot keyed the macro rather than the last
active point in the macro.


--
Trintrin
------------------------------------------------------------------------
Trintrin's Profile: http://www.excelforum.com/member.php...o&userid=32681
View this thread: http://www.excelforum.com/showthread...hreadid=527753


Dave Peterson

Go back to where you were before the Macro
 
dim myStartRng as range
set mystartrng = selection

'do your work

application.goto mystartrng



Trintrin wrote:

can anyone tell me how to edit a macro so that it takes you back to
where you were before you hot keyed the macro rather than the last
active point in the macro.

--
Trintrin
------------------------------------------------------------------------
Trintrin's Profile: http://www.excelforum.com/member.php...o&userid=32681
View this thread: http://www.excelforum.com/showthread...hreadid=527753


--

Dave Peterson

Trintrin

Go back to where you were before the Macro
 

awesome!!!


--
Trintrin
------------------------------------------------------------------------
Trintrin's Profile: http://www.excelforum.com/member.php...o&userid=32681
View this thread: http://www.excelforum.com/showthread...hreadid=527753



All times are GMT +1. The time now is 03:57 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com