Results 1 to 4 of 4

Auto hide & protect worksheets before closing

Threaded View

  1. #1
    Registered User
    Join Date
    06-04-2011
    Location
    paris
    MS-Off Ver
    Excel 2010
    Posts
    4

    Auto hide & protect worksheets before closing

    Hi folks,

    I wrote the following code to hide & password protect an excel sheet :

    Sub Hideconfidential()
    Worksheets("confidential").Visible = xlSheetVeryHidden
    End Sub
    Sub UnHideconfidential()
    rspn = InputBox("Enter Password")
    If rspn <> "Pw" Then Exit Sub
    Worksheets("confidential").Visible = xlSheetVisible
    End Sub
    How could I alter it so that it hides and protects this sheet automatically before closing the workbook ?

    Thank you!
    Last edited by Leith Ross; 11-15-2011 at 03:26 PM. Reason: Added Code Tags

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