Return to main sheet

  • Thread starter Thread starter Charles Reid
  • Start date Start date
C

Charles Reid

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
 
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

Write this after your last code line (before "end sub")

Worksheets("Master").select

that changes the focus to the Master.

hth

Carlo
 
The best way is to avoid leaving it by NOT selecting other sheets.

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
Dim ActCell as range
Set actcell = activecell
'do lots of stuff
'go back to original activecell
application.goto actcell
 
Back
Top