XL: Sheets Hidden with XlVeryHidden Can Be Viewed in Word

Last reviewed: February 3, 1998
Article ID: Q171420
The information in this article applies to:
  • Microsoft Excel 98 Macintosh Edition
  • Microsoft Excel 97 for Windows
  • Microsoft Excel for Windows 95, versions 7.0, 7.0a
  • Microsoft Excel for Windows, versions 5.0, 5.0c
  • Microsoft Excel for the Macintosh, versions 5.0, 5.0a
  • Microsoft Word 98 Macintosh Edition
  • Microsoft Word 97 for Windows
  • Microsoft Word for Windows 95, versions 7.0, 7.0a
  • Microsoft Word for Windows, versions 6.0, 6.0c
  • Microsoft Word for the Macintosh, versions 6.0, 6.0.1

SYMPTOMS

If you open a Microsoft Excel workbook in Microsoft Word, a sheet that you hid by using the Visible property and the xlVeryHidden setting is available in the Open Workbook (Word 6.0) or Open Worksheet (Word 7.0, 97, 98) dialog box. If you open the sheet, you can view the data on the sheet.

CAUSE

This behavior occurs because the converter that Microsoft Word uses to open Microsoft Excel workbooks ignores any settings you specify for the Visible property of a sheet in a Microsoft Visual Basic for Applications macro.

WORKAROUND

Other than making the workbook an add-in, you cannot hide worksheets so they cannot be viewed in Microsoft Word. However, you can place a password on the Microsoft Excel file so you cannot open the file in Microsoft Word or Microsoft Excel without typing the password.

To place a password on a Microsoft Excel file, follow these steps:

  1. On the File menu, click Save As.

  2. In the Save As dialog box, click the destination folder for the file, enter a name for the file, and then click Options.

  3. In the Save Options dialog box in Microsoft Excel 97 or Microsoft Excel 98, type a password in the Password To Open box.

    In earlier versions, type a password in the Protection Password box.

  4. Click OK.

  5. Retype the password in the Confirm Password dialog box, and then click OK.

  6. In Microsoft Excel 7.0, 97, and 98, click Save. In Microsoft Excel 5.0, click OK.

STATUS

This behavior is by design of the Microsoft Excel converter that Microsoft Word uses to open Microsoft Excel workbooks.

REFERENCES

For more information about the Visible property, in Microsoft Excel 97 click the Office Assistant in the Visual Basic Editor, type "visible," click Search, and then click to view "Visible Property (Excel 97)."

NOTE: If the Assistant is hidden, click the Office Assistant button on the Standard toolbar. If Microsoft Help is not installed on your computer, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q120802
   TITLE     : Office: How to Add/Remove a Single Office
               Program or Component


Additional query words: XL97 XL98 XL7 XL5 WD97 WD98 kbusage
Keywords : kbprg
Version : MACINTOSH:5.0,6.0,98;WINDOWS:7.0,97
Platform : MACINTOSH WINDOWS
Issue type : kbprb
Solution Type : kbworkaround


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 3, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.