View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Return to Original Workbook

Dim mySelection as range
Dim myActCell as Range

set myActcell = activecell
set mySelection = selection

'do lots of stuff

application.goto mySelection
myActcell.activate




ajvasel wrote:

I feel like I'm missing the answer to a pretty simple question, but I have
not been able to find any other threads related to this.

In the program that I am working on, I run a series of sub routines that
copy data from the original workbook to a new workbook. After I run each sub,
I need to be able to come back (or activate, I guess) to the original
workbook before I call the next sub.

I tried naming the original workbook

Dim RunRateMain As Workbook

and then re-activating it after I ran the first of the series of the subs,
but that didn't seem to work

Any help would be appreciated...


--

Dave Peterson