Results 1 to 6 of 6
  1. #1
    5 Star Lounger
    Join Date
    Apr 2001
    Location
    Arriving Somewhere but not Here
    Posts
    698
    Thanks
    0
    Thanked 0 Times in 0 Posts

    xlVeryHidden property (XL2000 sr2 on Win 2000)

    While experimenting with the xlVeryHidden property of worksheets in a workbook I've run into the a little problem, one sheet refuses to unhide. I think it may be because the sheet name includes an ampersand (&).

    Entering <font face="Georgia">Worksheets("mean&range").Visible = True</font face=georgia> in the immediate window gives:
    Run time error '9':
    Subscript out of range

    stuck

  2. #2
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: xlVeryHidden property (XL2000 sr2 on Win 2000)

    I did not have any problem with this name. Are you sure the activeworkbook has this worksheet (ie what is the activeworkbook)?

    You can also change it manually from the properties window (F4) after selecting the sheet.

    Steve

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: xlVeryHidden property (XL2000 sr2 on Win 2000)

    Works without problem in Excel 2002. See if you can make it work by using the numeric index instead of the name. Say that this sheet is the 2nd worksheet in the workbook:

    Worksheets(2).Visible = True

  4. #4
    5 Star Lounger
    Join Date
    Apr 2001
    Location
    Arriving Somewhere but not Here
    Posts
    698
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: xlVeryHidden property (XL2000 sr2 on Win 2000)

    <img src=/S/doh.gif border=0 alt=doh width=15 height=15> <img src=/S/stupidme.gif border=0 alt=stupidme width=30 height=30> The worksheet was a chart so I needed charts("mean&range").visible = true

    Sorry about that one folks.

    stuck

  5. #5
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: xlVeryHidden property (XL2000 sr2 on Win 2000)

    <hr>The worksheet was a chart <hr>
    You mean the "Sheet was a chart and not a worksheet".

    You could use the more generic:
    sheets("mean&range").visible = true

    Charts are charts and worksheets are worksheets, they are both sheets. a worksheet is never a chartsheet and a chartsheet is never a worksheet.

    Steve

  6. #6
    5 Star Lounger
    Join Date
    Apr 2001
    Location
    Arriving Somewhere but not Here
    Posts
    698
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: xlVeryHidden property (XL2000 sr2 on Win 2000)

    <img src=/S/thankyou.gif border=0 alt=thankyou width=40 height=15>, clarification gratefully received.

    stuck

Posting Permissions

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