Ensuring a specified sheet is the only sheet visible

not very bright dave

Board Regular
Joined
Dec 20, 2004
Messages
244
Hi

Is there a way, irrespective of which page the workbook may have been saved on, that on opening the workbook, the same front sheet can be the only one visble each time? Basically, I have a front access sheet which explains th workbook. I'm guessing ot might be something like:

on saving, open front sheet and hide current sheet

but I'm not sure what the code for this would be.

Thanks in advance

PS is there an easy way to password protect macros in a workbook?
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result

Glaswegian

Well-known Member
Joined
Oct 14, 2003
Messages
1,487
Hi Dave

Something like this, in ThisWorkbook would always show a sheet called 'Front Sheet' when the book is opened.

<font face=Courier New><SPAN style="color:#00007F">Private</SPAN> <SPAN style="color:#00007F">Sub</SPAN> Workbook_Open()
Sheets("Front Sheet").Select
<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN></FONT>

You said you wanted one sheet to be visible - do you want to hide the other sheets or perhaps hide the tabs?

As for protecting the code, open the VB Editor, click on your project and then go to Tools | VBA Project Properties and choose the Protection tab. Bear in mind that this is not 100% secure - have a search on the Board for numerous threads on this subject.

HTH

Regards
 

Forum statistics

Threads
1,148,228
Messages
5,745,482
Members
423,953
Latest member
MrC54

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top