how to view hidden sheets with Button Control

RJSIGKITS

Board Regular
Joined
Apr 15, 2013
Messages
109
Hi Guys.

Trying to achieve a hidden sheets (No visible tabs) type scenario, but to allow visibility with a Button Control.
So far, I have played with hiding the sheet by right clicking the tab and selecting 'Hide'
I currently have a Comand button with the following Code:

Code:
Private Sub CommandButton12_Click()    Dim pword As String
        pword = InputBox("Enter the password to Continue.", "Password Required!", "Type Password")
        
        If pword <> "Bobby12" Then
            MsgBox "Incorrect Password", vbExclamation + vbOKOnly, "Error"
            Exit Sub
        Else
            MsgBox "Success! Click OK to Proceed", vbInformation + vbOKOnly, "Success"
            ThisWorkbook.Sheets("Supplier Order Log").Activate
        End If
End Sub

However, when this is clicked, it ignores the hidden sheet and goes to the next sheet along.

On top of this, I really wanted the hidden sheet to be more securely hidden, by using the sheets VB property of xlSheetVeryHidden.

Any ideas from you Genius people?

Thanks in advance.
 

Some videos you may like

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college

RJSIGKITS

Board Regular
Joined
Apr 15, 2013
Messages
109
Ah... It's alright, it's far simpler than I thought - Done:


  • Step 1: Click the File tab in Excel 2010/2013, or click the
    doc-office-2007-button.GIF
    button in Excel 2007;
  • Step 2: Click the Options button;
  • Step 3: In the Excel Options dialog box, go to the Advanced category;
  • Step 4: Scroll down to the Display options for this workbook section;
  • Step 5: Check or uncheck the Show sheet tabs option according to your needs. See screenshot:
  • Step 6: Click OK. All of the worksheet tabs will be displayed or hidden.
 

Watch MrExcel Video

Forum statistics

Threads
1,122,372
Messages
5,595,787
Members
414,021
Latest member
whyjaydee

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