XL2000: Sheets Hidden with XlVeryHidden Can Be Viewed in Word (213692)



The information in this article applies to:

  • Microsoft Excel 2000
  • Microsoft Word 97 for Windows

This article was previously published under Q213692

SYMPTOMS

If you open a Microsoft Excel 2000 workbook in Microsoft Word, a sheet that you hid by using the Visible property and the xlVeryHidden setting is unexpectedly available in the Open Workbook (Word 6.0) or Open Worksheet (Word 95, 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 Word uses to open Excel workbooks ignores any settings that 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 that they cannot be viewed in Word. However, you can place a password on the Excel file so that you cannot open the file in Word or Excel without typing the password.

To place a password on an 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 Excel 2000, type a password in the Password To Open box.
  4. Click OK.
  5. Retype the password in the Confirm Password dialog box, and then click OK.
  6. Click Save.

REFERENCES

For more information about the Visible property, click Microsoft Visual Basic Help on the Help menu, type visible property in the Office Assistant or the Answer Wizard, and then click Search to view the topic.

Modification Type:MinorLast Reviewed:10/11/2006
Keywords:kbprb kbProgramming KB213692