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 / September 2004

Tip: Looking for answers? Try searching our database.

Run auto macro on workbook close

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
sgrech - 18 Sep 2004 15:59 GMT
Hi,
I am sure this is a simple problem for the experts out there.  

I have a workbook with x number of worksheets.  All of the sheets hav
data.  One of the sheets is called summary.  When the user has update
anyone of the sheets (other than the summary sheet) and then saves an
closed the workbook, I need the summary worksheet to be activate
before this process is completed.  Therefore when the file is nex
opened The worksheet call summary will be always be on view.

Please help.

Thanks
Simon :confused
JulieD - 18 Sep 2004 16:28 GMT
Hi Simon

or another approach is to put a macro in on open of the workbook that
activates the summary sheet
e.g.
Right mouse click on any of the worksheet tabs
choose view / code
on the left of the screen you should see the name of your workbook in
brackets & bold (if not, choose view / project explorer from the menu)
under your workbook name you should see ThisWorkbook (after the list of
sheets)
double click on ThisWorkbook
on the right you should have a blank area - with two drop down boxes, choose
the left hand side one and from it choose Workbook
the right hand side one should change to Open
and you should see
Private Sub Workbook_Open()

End Sub

between these two lines type

Sheets("Summary").activate

switch back to your workbook (Alt & F11) and close & save the workbook.

test it out

Cheers
JulieD

> Hi,
> I am sure this is a simple problem for the experts out there.
[quoted text clipped - 10 lines]
> Thanks
> Simon :confused:
 
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.