Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

Error message when you try to unprotect an IRM-protected workbook programmatically in Excel 2003: "Run-time error: 1004"


View products that this article applies to.

Symptoms

Consider the following scenario. You open a workbook that you helped protect by using Information Rights Management (IRM) in Microsoft Office Excel 2003. Then, you try to unprotect the IRM-protected workbook programmatically by using the Unprotect method. In this scenario, the workbook is not unprotected. If you try to help reprotect the workbook programmatically by using the Protect method, the workbook is not reprotected. Additionally, you receive one or more of the following error messages.
Error message 1
Run-time error: 1004
Error message 2
Protect Run-time error '1004': Application-defined or object-defined error
Error message 3
Unprotect Run-time error '1004': Unprotect method of Worksheet class failed

↑ Back to the top


Status

This behavior is by design.

↑ Back to the top


More information

For more information about how to use Information Rights Management in Excel 2003, click the following article number to view the article in the Microsoft Knowledge Base:
826923� Description of options that help you protect your worksheets in Excel 2003 and Excel 2002

↑ Back to the top


Keywords: KB914199, kbprb, kbexpertisebeginner, kbtshoot, kbautomation, kbvba

↑ Back to the top

Article Info
Article ID : 914199
Revision : 3
Created on : 3/7/2006
Published on : 3/7/2006
Exists online : False
Views : 256