Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 425
Default mark active cell and return to paste

after macro is run

....i want to run another macro starting in the exact cell that the
previous code ended in.


mark active cell
Range("R4").Select
Selection.Copy
return to "active cell"
ActiveSheet.Paste
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,533
Default mark active cell and return to paste

No need to use select, it is just slowing down the code:

Range("R4").Copy ActiveCell

or the more descriptive one:
Range("R4").Copy Destination:=ActiveCell

Regards,
Per

"J.W. Aldridge" skrev i meddelelsen
...
after macro is run

...i want to run another macro starting in the exact cell that the
previous code ended in.


mark active cell
Range("R4").Select
Selection.Copy
return to "active cell"
ActiveSheet.Paste


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 425
Default mark active cell and return to paste

THANX!
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 65
Default mark active cell and return to paste

On Mar 1, 12:13*pm, "J.W. Aldridge"
wrote:
after macro is run

...i want to run another macro starting in the exact cell that the
previous code ended in.

mark active cell
* * Range("R4").Select
* * Selection.Copy
return to "active cell"
* * ActiveSheet.Paste


Unless I'm misreading, it sounds like you want to save the location of
the last active cell processed by Macro-A (for instance) to
<someplace so Macro-B can begin its own processing from that
location.

A public global variable would allow you to pass Macro-A's last active
cell location to Macro-B, however only if they run during the same
session -- otherwise the easiest way I can think of is for Macro-A to
save the location to an otherwise unused known location (ie: cell
IV65536) so Macro-B can assign it to its own variable when it begins
processing.
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Return to active cell after sort Patrick C. Simonds Excel Programming 2 August 2nd 08 03:58 AM
Mark active row in column A (VB question) Ben Excel Discussion (Misc queries) 4 May 29th 08 06:55 PM
How can I add active tick mark/check mark boxes in excel? gerberelli Excel Discussion (Misc queries) 2 May 3rd 08 05:16 PM
Return to active cell Alex.W Excel Discussion (Misc queries) 2 June 19th 07 11:35 PM
Copy from active sheet and paste into new sheet using info from cell in active Ingve Excel Programming 3 January 23rd 06 09:57 PM


All times are GMT +1. The time now is 07:07 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"