Hello All,
I was wondering if there is a way to always return to my default main sheet
after a macro runs.
What I have is the following:
1. Three sheets (Master, Name, Invoice)
2. Macro to create additional Invoice tab (Invoice2, Invoice3, and etc...)
3. After the invoice macro runs, it has the last invoice sheet in focus.
What I want is, once the macro executes, to return focus back to Master. Is
this possible?
Thanks for any and all help with this
charles
carlo - 14 Nov 2007 05:01 GMT
> Hello All,
>
[quoted text clipped - 13 lines]
>
> charles
Write this after your last code line (before "end sub")
Worksheets("Master").select
that changes the focus to the Master.
hth
Carlo
Bob Phillips - 14 Nov 2007 11:39 GMT
The best way is to avoid leaving it by NOT selecting other sheets.

Signature
---
HTH
Bob
(there's no email, no snail mail, but somewhere should be gmail in my addy)
> Hello All,
>
[quoted text clipped - 14 lines]
>
> charles
Dave Peterson - 14 Nov 2007 12:32 GMT
Dim ActCell as range
Set actcell = activecell
'do lots of stuff
'go back to original activecell
application.goto actcell
> Hello All,
>
[quoted text clipped - 13 lines]
>
> charles

Signature
Dave Peterson