Results 1 to 4 of 4
  1. #1
    5 Star Lounger jujuraf's Avatar
    Join Date
    Jun 2001
    Location
    San Jose, California, USA
    Posts
    1,061
    Thanks
    0
    Thanked 0 Times in 0 Posts

    unhiding sheets (Excel 2000)

    I often use the .Visible = xlSheetVeryHidden on worksheets when I want to use a sheet for special purposes w/o worrying about the end user getting access to it. I also know that when a sheet is set to 'very hidden' it doesn't appear in the Format/Sheet/Unhide list. That's GREAT! <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

    I now want an admin-type of user to be able to make these same sheets appear in the "unhide" list but not visible on the tabs. The admin enters a password and then the code sets .visible = xlsheethidden to a set of specific sheets. This doesn't work, it doesn't do anything.

    When I recorded a macro to unhide a sheet via the Format/Sheet/Hide menu, it did this;
    <pre> ActiveWindow.SelectedSheets.Visible = False</pre>

    Is this is the only way to do it? It seems might weird. How do I 'select' multiple sheets?

    It seems once a sheet is set to 'very hidden' I can only make it visible, not just regular 'hidden', true?

    Deb <img src=/S/bananas.gif border=0 alt=bananas width=33 height=35>

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Dublin, Ireland, Republic of
    Posts
    2,697
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: unhiding sheets (Excel 2000)

    Deb,

    Try .Visible = xlHidden , which does seem to work.

    Andrew

  3. #3
    5 Star Lounger jujuraf's Avatar
    Join Date
    Jun 2001
    Location
    San Jose, California, USA
    Posts
    1,061
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: unhiding sheets (Excel 2000)

    Nope, didn't work for me. That's what I did originally. Each of these sheets were originally set to .Visible = xlSheetVeryHidden and so I then set them to .Visible = xlSheetHidden but they still don't appear in the 'unhide' list (from Format/Sheet/Unhide menu).

    For some reason now it is working I have no idea why. I created a new workbook to test this one piece of code and hide two of the three sheets. They did successfully appear and disappear in the Format/Sheet/Unhide list.

    I then reran the code in my real project and it worked. So the initial glitch must of been caused by sun spots or the background color of my dekstop or what I ate for lunch.

    It works now so I'm not going to complain... weird. <img src=/S/flee.gif border=0 alt=flee width=25 height=25>
    Deb <img src=/S/stupidme.gif border=0 alt=stupidme width=30 height=30>

  4. #4
    5 Star Lounger jujuraf's Avatar
    Join Date
    Jun 2001
    Location
    San Jose, California, USA
    Posts
    1,061
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: unhiding sheets (Excel 2000)

    Now I REALLY know what the problem was, not sun spots as I said before. I had protected the workbook after looping through the worksheets to selectively hide them. That's why they didn't appear in the Format/Sheets/Unhide list!!

    Lesson learned. The Unhide list is not available if workbook is hidden.[ doh] I should of figured that one out way before now!

    Deb <img src=/S/bash.gif border=0 alt=bash width=35 height=39>

Posting Permissions

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