XL5: Macro Cannot Set Module to xlVeryHidden |
Q131551
When you set the Visible property of a module to xlVeryHidden, you may receive the following error message:
Macro Error 1005:
Unable to set the Visible Property of the Module Class
This error will occur if the module that is being hidden contains a macro that is currently running.
If you would like to set the modules in a workbook to VeryHidden after you have finished creating them, follow these steps:
Sub HideModules()
For each m in Modules
If m.Name <> Activesheet.Name Then m.Visible = xlVeryHidden
Next
End Sub http://www.microsoft.com/partner/referral/For more information about the support options available from Microsoft, please see the following page on the World Wide Web:
http://support.microsoft.com/directory/overview.asp
This behavior is by design of the versions of Microsoft Excel listed at the beginning of this article.
In Microsoft Excel, setting the Visible Property of an object to
xlVeryHidden hides the object so that it may only be unhidden by setting
the Visible Property to True. For module sheets, this feature is primarily
used to add a measure of protection to the macros in a workbook.
NOTE: You will also receive this error message in two other situations:
Q128192 Can't Insert Sheet Based on Template with Hidden Sheet
Q128373 Macro Cannot Determine If Sheet Is VeryHidden
Q127944 Sheet Based on Template with Hidden Sheet Not Inserted
For more information about the Visible property, choose the Search button in Programming with Visual Basic Help and type:
visible property
Additional query words: very hidden XL5
Keywords : kbprg
Issue type :
Technology :
|
Last Reviewed: December 29, 2000 © 2001 Microsoft Corporation. All rights reserved. Terms of Use. |