Worksheet Properties via a Menu
Hidden away, well actually it’s just found on the Developer Tab, in Excel 2007 and 2010 is a Properties Button.
The properties Button is generally used for configuring Active X controls, where all the parameters of the control can be set.
One other useful feature of the Properties Button is that it directly accesses several features of a Worksheets properties.
Most of these properties are usually only accessed via VBA code.
Where’s the Developers Tab
The developers Tab is enabled by going to the Excel Options menu (next to the Exit Excel button),
On the Popular Tab, select Enable Developer Tab on the Ribbon
Use
To use these functions select a cell on a worksheet and press the Properties Button.
A Properties window will be shown, showing the following properties:
Display Page Breaks
Displays Page Breaks if set to True;
Default is False, Don’t display page breaks
Display Right to Left
Enable Right to Left Page Layout if set to True. This will put Column A on the Right Hand side of the screen and Columns B… will then be to the left of Column A.
Default is False
Enable Autofilter
Enables or Disables the AutoFilter arrows on a protected worksheet
Default is False (Arrows are disabled)
Enable Calculation
Totally disables calculation of the current sheet
Using F9 does not force calculation.
Default is False, Calculation is enabled
Enable Format Conditions Calculation
When set to True (default), evaluation of conditional formats will will occur automatically as needed.
When set to False, conditional formats will not be re-evaluated. Any previously applied conditional formatting will still be visible, but it will not update as cell values are changed.
The purpose of this flag is to allow VBA programmers to configure a rule completely before evaluating it. This is particularly useful when condition is applied over a large range as performance can be slow in these cases.
Enable Outlining
Enables outlining symbols on a protected worksheet
Default is False, Outline symbols disabled
Enable PivotTable
This enables PivotTable controls on a protected worksheet
Default is False, PivotTable controls are disabled
Enable Selection
Show and Enable the selection status of cells
Value Status
0 No Restrictions
1 Locked Cells
-4142 No Selection
These are only relevant when the Page is Locked
Name
Shows and allows you to rename the current Worksheet
Default is the current Worksheets Name
Scroll Area
Allows the definition of a Scroll Area where the user cannot move out of
Eg: Enter D10:M40 to restrict user interaction to this area
Default is Blank – Scroll area not set
Standard Width
Shows and allows you to set the default column Width in Standard Character Widths
Default is 8.43
This value represents the number of characters that can be displayed in a cell that is formatted with the standard font (standard font: The default text font for worksheets. The standard font determines the default font for the Normal cell style.).
Visible
Show or set the current sheets visibility status
Value Status
-1 Visible
0 Hidden
2 Very Hidden
Obviously once a sheet is Hidden or Very hidden it isn’t available to select to enable the properties menu and so this can only be used to hide but not unhide Worksheets.
What Have You Found Hidden in Excel ?
Let us know what you’ve found hidden in Excel in the comments below:




















6 Responses to “Make VBA String Comparisons Case In-sensitive [Quick Tip]”
Another way to test if Target.Value equal a string constant without regard to letter casing is to use the StrCmp function...
If StrComp("yes", Target.Value, vbTextCompare) = 0 Then
' Do something
End If
That's a cool way to compare. i just converted my values to strings and used the above code to compare. worked nicely
Thanks!
In case that option just needs to be used for a single comparison, you could use
If InStr(1, "yes", Target.Value, vbTextCompare) Then
'do something
End If
as well.
Nice tip, thanks! I never even thought to think there might be an easier way.
Regarding Chronology of VB in general, the Option Compare pragma appears at the very beginning of VB, way before classes and objects arrive (with VB6 - around 2000).
Today StrComp() and InStr() function offers a more local way to compare, fully object, thus more consistent with object programming (even if VB is still interpreted).
My only question here is : "what if you want to binary compare locally with re-entering functions or concurrency (with events) ?". This will lead to a real nightmare and probably a big nasty mess to debug.
By the way, congrats for you Millions/month visits 🙂
This is nice article.
I used these examples to help my understanding. Even Instr is similar to Find but it can be case sensitive and also case insensitive.
Hope the examples below help.
Public Sub CaseSensitive2()
If InStr(1, "Look in this string", "look", vbBinaryCompare) = 0 Then
MsgBox "woops, no match"
Else
MsgBox "at least one match"
End If
End Sub
Public Sub CaseSensitive()
If InStr("Look in this string", "look") = 0 Then
MsgBox "woops, no match"
Else
MsgBox "at least one match"
End If
End Sub
Public Sub NotCaseSensitive()
'doing alot of case insensitive searching and whatnot, you can put Option Compare Text
If InStr(1, "Look in this string", "look", vbTextCompare) = 0 Then
MsgBox "woops, no match"
Else
MsgBox "at least one match"
End If
End Sub