+ Reply to Thread
Results 1 to 4 of 4

Recovering the hidden file

  1. #1
    Registered User
    Join Date
    03-05-2013
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    31

    Recovering the hidden file

    hi,

    I put below mentioned VBA code in my excel sheet

    HTML Code: 
    Option Explicit 
    Option Compare Text 
     'Password to unhide sheets
    Const pWord = "MyPassword" 
     
    Sub HideSheets() 
         'Set worksheet to Very Hidden so that it can only be unhidden by a macro
        Worksheets("Confidential").Visible = xlSheetVeryHidden 
    End Sub 
     
    Sub ShowSheets() 
         'Prompt the user for a password and unhide the worksheet if correct
        Select Case InputBox("Please enter the password to unhide the sheet", _ 
            "Enter Password") 
             
        Case Is = pWord 
            With Worksheets("Confidential") 
                .Visible = xlSheetVisible 
                .Activate 
                .Range("A1").Select 
            End With 
        Case Else 
            MsgBox "Sorry, that password is incorrect!", _ 
            vbCritical + vbOKOnly, "You are not authorized!" 
        End Select 
    End Sub 
     
     '** This code goes in the ThisWorkbook module **
    Option Explicit 
     
    Private Sub Workbook_Open() 
         'Turn off screen updates
        Application.ScreenUpdating = False 
         
         'Hide confidential sheet at startup
        Call HideSheets 
         
         'Activate cell A1 on the Dashboard sheet at startup
        With Worksheets("Dashboard") 
            .Activate 
            .Range("A1").Select 
        End With 
         
         'Restore screen updates
        Application.ScreenUpdating = True 
    End Sub 
    now I've deleted this code. problem is that I'm not able to unhide my hidden sheet.

    plz help me in this regards, as those file is very important.

  2. #2
    Forum Moderator Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Recovering the hidden file

    The code gives you the option to unhide your sheets using a password. In this case "MayPassword"
    This piece of the code does this.
    Please Login or Register  to view this content.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Registered User
    Join Date
    03-05-2013
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    31

    Re: Recovering the hidden file

    thank you very much

  4. #4
    Forum Moderator Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Recovering the hidden file

    You are welcome and thanks for the feedback.

    As that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED,as per Forum Rule #9. Thank you.

    Also, as a new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Recovering overwritten file
    By Bostrolicious in forum Excel General
    Replies: 4
    Last Post: 07-13-2014, 11:37 PM
  2. Recovering a file that WAS saved...
    By tbnm in forum Excel General
    Replies: 2
    Last Post: 01-28-2011, 03:35 AM
  3. Recovering An Overwritten File
    By Need To Recover A Spreadsheet in forum Excel General
    Replies: 1
    Last Post: 07-21-2005, 12:05 PM
  4. [SOLVED] Recovering a file that won't open
    By Jeff Jones in forum Excel General
    Replies: 3
    Last Post: 06-15-2005, 10:05 AM
  5. [SOLVED] Recovering excel file
    By MDJ in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-01-2005, 09:06 PM

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