Microsoft KB Archive/171420

= Sheets Hidden with XlVeryHidden Can Be Viewed in Word =

Article ID: 171420

Article Last Modified on 1/20/2007

-

APPLIES TO


 * Microsoft Excel 97 Standard Edition
 * Microsoft Excel 95 Standard Edition
 * Microsoft Excel 5.0 Standard Edition
 * Microsoft Excel 98 for Macintosh
 * Microsoft Word 97 Standard Edition
 * Microsoft Word 95a
 * Microsoft Word 95 Standard Edition
 * Microsoft Word 6.0c
 * Microsoft Word 6.0 Standard Edition
 * Microsoft Word 98 for Macintosh
 * Microsoft Word 6.01 for Macintosh
 * Microsoft Word 6.0 for Macintosh

-



This article was previously published under Q171420





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.
 * 1) Click OK.
 * 2) Retype the password in the Confirm Password dialog box, and then click OK.
 * 3) 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.

