Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / November 2007

Tip: Looking for answers? Try searching our database.

Return to main sheet

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Charles Reid - 14 Nov 2007 04:20 GMT
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

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.