Save and Close Workbook

bmonique368

New Member
Joined
Oct 23, 2014
Messages
17
Hello Everyone.

I hope someone will be able to assist me with this issue.

Each time I open my Ms Excel Workbook it shows the sheet it was on before it was closed. What I want to do is, on the click of a button, it will do three things: 1. save the file. 2. Return to a main page 3. Close the file.

Currently it does two of the three with the following code;
Code:
ActiveWorkbook.Close SaveChanges:=True
Is there a way to add the third task to the above code?

Your help will be highly appreciated.

Thank You!....
 

JoeMo

MrExcel MVP
Joined
May 26, 2009
Messages
16,669
Code:
With Activeworkbook
.sheets("main page 3").select  'Put the correct name of the sheet between the quote marks
.close savechanges:= True
End With
 

Forum statistics

Threads
1,082,602
Messages
5,366,566
Members
400,903
Latest member
fathima

Some videos you may like

This Week's Hot Topics

Top