Sheets Hidden with XlVeryHidden Can Be Viewed in Word (171420)
The information in this article applies to:
- Microsoft Excel 97 for Windows
- Microsoft Excel for Windows 95
- Microsoft Excel for Windows 5.0
- Microsoft Excel 98 Macintosh Edition
- Microsoft Word 97 for Windows
- Microsoft Word for Windows 95 7.0a
- Microsoft Word for Windows 95
- Microsoft Word for Windows 6.0c
- Microsoft Word for Windows 6.0
- Microsoft Word 98 Macintosh Edition
- Microsoft Word for the Macintosh 6.0.1
- Microsoft Word for the Macintosh 6.0
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:
- On the File menu, click Save As.
- In the Save As dialog box, click the destination folder for the file,
enter a name for the file, and then click Options.
- 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.
- Click OK.
- Retype the password in the Confirm Password dialog box, and then click
OK.
- 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:
120802 Office: How to Add/Remove a Single Office Program or Component
Modification Type: | Minor | Last Reviewed: | 8/17/2005 |
---|
Keywords: | kbprb kbProgramming KB171420 |
---|
|