Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TugboatEng on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Closing worksheets

Status
Not open for further replies.

tim216

Civil/Environmental
Joined
Aug 27, 2002
Messages
38
Location
US
I have a series of worksheets that I can open from a main switchboard similar to acces through command buttons. How can close a worksheet and return to the main sheet without it completely closing excel. The other sheets open through vba commands.
 
It sounds like you are making a "switchboard" to replace the sheet tabs.

One simple method (instead of hiding the shets) is to turn off the sheet tabs under <tools><options>.

On each sub sheet just add a button similar to the ones on the &quot;Switchboard&quot; each referencing back to the &quot;switchboard&quot; sheet name, e.g. the code would be.

Sub GoToFrontsheet()
Sheets(&quot;Frontsheet&quot;).Select
End Sub


Hope this helps
Regards
Mogens
 
Similarly, you can close any workbook (easiest if you know its name) by, for example,
Workbooks(&quot;BOOK1.XLS&quot;).Close SaveChanges:=False

Obviously, you should replace BOOK1.XLS by the name of the workbook you're closing.

Cheers,
Joerd

Please see FAQ731-376 for tips on how to make the best use of Eng-Tips.
 
Thanks guys

I think that answers my question.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top