The Versatile Properties Window

The Properties window is mainly used for Microsoft Excel Objects and Forms. The Properties window is context specific—this means that, depending on what you have selected either in the Project Explorer or while designing a form, the Properties window displays a number of properties (you can think of these properties as settings or characteristics) associated with the object that you can examine and edit. If you are not sure what a particular property is, select the property in the Properties window and press F1 to view documentation related to the property.

You Can't Do This Using the Normal Excel User Interface

In Chapter 1, I mentioned that you can use VBA code to do things that you can't perform through the normal Excel interface. I am excited to tell you about one trick that you can pull off with the Properties window without knowing how to do it using VBA code. Well, its not really a trick, but it is a very useful functionality that hardly anyone knows about outside of the Excel development community.

Have you ever wanted to hide a worksheet? I mean really hide it? I'm talking so hidden that it doesn't appear when you select Format ^ Sheet ^ Unhide. You can make a worksheet this hidden using the Properties window. Select the worksheet you want to hide, and in the Properties window, change the Visible property to 2 - xlSheetVeryHidden.

Properties - Sheet3 ®

| Shcct3 Worksheet


1 Alphabetic | Categorised |

1 {(Name)


psplayFageBreaks Face 1

1 hsplayRightToLeft FaSse










0 - xlNoRestrictions



1 KcrolArea | ||

1 ¡StandardWidth



'•MMiMiWjRiiWHTI ~ I

-l - xBheetvislble ¡0 - xlSheetHdden

2 - xlSheetVeryHidden


This has to be one of my favorite defined constant names (a constant is just a human-readable name that has been given to a literal value to help make code easier for homo sapiens to decipher). Do you suppose that someday we might have an option for xlSheetVeryVeryHidden? Maybe one that you can only read and set programmatically? That would be nice too!

Anyway, once hidden in this manner, the only way to unhide the worksheet is either programmat-ically or by changing the Visible property back to -1 - xlSheetVisible using the Properties window.

0 0


Post a comment