Consulting

Results 1 to 18 of 18

Thread: Hide & protect sheet

  1. #1

    Hide & protect sheet

    Is it posiible to hide & protect sheet so that no one can see that it is hidden & unprotect it withot me.
    A mighty flame followeth a tiny sparkle!!



  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Quote Originally Posted by excelliot
    Is it posiible to hide & protect sheet so that no one can see that it is hidden & unprotect it withot me.
    The best that you can do is to go into the VB IDE, select the worksheet in the exploirer window, and then in the properties window (Ctrl-G), set the Visible property to very hidden. Hidden will hide it, but it will still show in Format>Sheets, whereas very hidden will not show it there. Of course, if the user is aware of this, they could change it back in the same way.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    Quote Originally Posted by xld
    The best that you can do is to go into the VB IDE, select the worksheet in the exploirer window, and then in the properties window (Ctrl-G), set the Visible property to very hidden. Hidfden will hide it, but it will still show in Format>Sheets, whereas very hidden will not show it there. Of course, if the user is aware of this, they could chan ge it back in the same way.
    This works for newbie who dont know about editing the sheet through VB IDE.
    But i have seen one sheet in which sheet waw extremely hidden to whic i could not unhide it throuhgh VB IDE.
    A mighty flame followeth a tiny sparkle!!



  4. #4
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Quote Originally Posted by excelliot
    This works for newbie who dont know about editing the sheet through VB IDE.
    But i have seen one sheet in which sheet waw extremely hidden to whic i could not unhide it throuhgh VB IDE.
    There might be some VBA project protection, or something else, but I have never seen an Excel file that I couldn't crack.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  5. #5
    VBAX Regular
    Joined
    Jun 2005
    Posts
    8
    Location
    If your trying to hide confidential info, don't bother with the built-in protection. There is software out there that can crack it in seconds...

    Seperate document protected by network rights is always best.

  6. #6
    Moderator VBAX Guru Ken Puls's Avatar
    Joined
    Aug 2004
    Location
    Nanaimo, BC, Canada
    Posts
    4,001
    Location
    Quote Originally Posted by excelliot
    But i have seen one sheet in which sheet waw extremely hidden to whic i could not unhide it throuhgh VB IDE.
    The only way I can see this is if the VBProject password was set. Even so, as Bob mentioned, it's easily cracked by someone who knows what they're doing.

    Personally, I use xlVeryHidden all the time to hide sheets that I don't want users to play with, and I never bother with protecting the Project. If they're that savvy and that determined, they will get in. Excel is NOT a secure development platform for confidential info, and MS has never claimed that it was.

    If your files are that confidential, put them somewhere else. If you have a user who is that problematic, discipline or fire them. If you've asked them not to go in there, made it as difficult as you can and they still crack it... I'd say you'd have just cause.

    My 2 cents.
    Ken Puls, CMA - Microsoft MVP (Excel)
    I hate it when my computer does what I tell it to, and not what I want it to.

    Learn how to use our KB tags! -||- Ken's Excel Website -||- Ken's Excel Forums -||- My Blog -||- Excel Training Calendar

    This is a shameless plug for my new book "RibbonX - Customizing the Office 2007 Ribbon". Find out more about it here!

    Help keep VBAX clean! Use the 'Thread Tools' menu to mark your own threads solved!





  7. #7
    Ok can i hide sheet very hidden & control it by macro so that it can not be unhidden. or can i do it by another way....
    A mighty flame followeth a tiny sparkle!!



  8. #8
    Moderator VBAX Guru Ken Puls's Avatar
    Joined
    Aug 2004
    Location
    Nanaimo, BC, Canada
    Posts
    4,001
    Location
    Quote Originally Posted by excelliot
    Ok can i hide sheet very hidden & control it by macro so that it can not be unhidden. or can i do it by another way....
    Uh... sort of.

    This will hide the sheet:
    worksheets("Sheet1").visible = xlsheetveryhidden
    This will unhide it:
    worksheets("Sheet1").visible = xlsheetvisible
    But what we were trying to say is that even if you do mark it VeryHidden, a use CAN still walk into the VBProject and change the status manually, or via the immediate window.
    Ken Puls, CMA - Microsoft MVP (Excel)
    I hate it when my computer does what I tell it to, and not what I want it to.

    Learn how to use our KB tags! -||- Ken's Excel Website -||- Ken's Excel Forums -||- My Blog -||- Excel Training Calendar

    This is a shameless plug for my new book "RibbonX - Customizing the Office 2007 Ribbon". Find out more about it here!

    Help keep VBAX clean! Use the 'Thread Tools' menu to mark your own threads solved!





  9. #9
    Look at this sheet which is in KB
    in this sheet there is 2 sheets whic is xlveryhidden

    this can not be unhidden

    how this can be done
    A mighty flame followeth a tiny sparkle!!



  10. #10
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Quote Originally Posted by excelliot
    Look at this sheet which is in KB
    in this sheet there is 2 sheets whic is xlveryhidden

    this can not be unhidden

    how this can be done
    It is done.

    As Ken and I said, protection in Excel is easily beaten
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  11. #11
    Quote Originally Posted by xld
    It is done.

    As Ken and I said, protection in Excel is easily beaten
    Can u tell me how to prorect sheet like sheet i have provided & unprotect it
    A mighty flame followeth a tiny sparkle!!



  12. #12
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Quote Originally Posted by excelliot
    Can u tell me how to prorect sheet like sheet i have provided & unprotect it
    Do it in Excel with the macro recorder on, it will give you the code.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  13. #13
    What is workbook structure & windows structure in xl.

    How to protect workbook structure & window structure.
    A mighty flame followeth a tiny sparkle!!



  14. #14
    Moderator VBAX Guru Ken Puls's Avatar
    Joined
    Aug 2004
    Location
    Nanaimo, BC, Canada
    Posts
    4,001
    Location
    I really don't follow quite what you're asking here... can you explain what you're after, exactly?
    Ken Puls, CMA - Microsoft MVP (Excel)
    I hate it when my computer does what I tell it to, and not what I want it to.

    Learn how to use our KB tags! -||- Ken's Excel Website -||- Ken's Excel Forums -||- My Blog -||- Excel Training Calendar

    This is a shameless plug for my new book "RibbonX - Customizing the Office 2007 Ribbon". Find out more about it here!

    Help keep VBAX clean! Use the 'Thread Tools' menu to mark your own threads solved!





  15. #15
    Quote Originally Posted by kpuls
    I really don't follow quite what you're asking here... can you explain what you're after, exactly?
    In a sheet workbook structure & windows structure is protected

    can u tell me How to protect workbook structure & window structure.
    A mighty flame followeth a tiny sparkle!!



  16. #16
    Moderator VBAX Guru Ken Puls's Avatar
    Joined
    Aug 2004
    Location
    Nanaimo, BC, Canada
    Posts
    4,001
    Location
    Ah, sorry excelliot. I've never used those properties yet.

    Here you go:
    ActiveWorkbook.Protect structure:=True, Windows:=True
    HTH,
    Ken Puls, CMA - Microsoft MVP (Excel)
    I hate it when my computer does what I tell it to, and not what I want it to.

    Learn how to use our KB tags! -||- Ken's Excel Website -||- Ken's Excel Forums -||- My Blog -||- Excel Training Calendar

    This is a shameless plug for my new book "RibbonX - Customizing the Office 2007 Ribbon". Find out more about it here!

    Help keep VBAX clean! Use the 'Thread Tools' menu to mark your own threads solved!





  17. #17
    VBAX Mentor Justinlabenne's Avatar
    Joined
    Jul 2004
    Location
    Clyde, Ohio
    Posts
    408
    Location
    in version 2000, I am at work and can't properly recall what differences on newer versions for the protection dialog box.

    Manually:
    TOOLS > PROTECTION > PROTECT WORKBOOK:
    • Place a check next to "Windows"

    VBA:
    Option Explicit 
    
    Sub test()
    With Workbooks(ThisWorkbook.Name)
    .Protect , True, True
    End With
    End Sub
    Justin Labenne

  18. #18
    thank all
    A mighty flame followeth a tiny sparkle!!



Posting Permissions

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