+ Reply to Thread
Results 1 to 2 of 2

Conditionally unhide hidden worksheet

  1. #1
    Registered User
    Join Date
    03-22-2005
    Posts
    2

    Question Conditionally unhide hidden worksheet

    How can I unhide certain "pre-hidden" worksheets when a user-input cell in a worksheet is equal to a certain value, e.g. the name of cell value equals to the worksheet name?

  2. #2
    Registered User
    Join Date
    02-25-2005
    Posts
    84
    It needs to be done with VB, however this piece of code will run every time you make the slightest change to your spreadsheet.


    Private Sub Worksheet_Change(ByVal Target As Range)
    If Range("a1") = "sample" Then
    ThisWorkbook.Unprotect "password"
    Sheets("HiddenSheet").Visible = 2 'Un-Hide sheet
    ThisWorkbook.Protect "password" 'Re-protect workbook
    End If
    End Sub



    If you dont protect the workbook, it can be manually un-hidden but also you need to lock the VBA Properties else you could simply check the VB code to see what the workbook password is, too.

    Also bear in mind how it might play out it people are set to high security (unsigned macros automatically turned off).
    Last edited by widemonk; 03-29-2005 at 04:21 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1