Leading the way in Microsoft Office Development
|Excel > Named Ranges > VBA Code > Constants and Formulas||< Previous | Next >|
How to detect a formula or a constant ?
Does the refers to contain an exclamation mark (!) if it does then it must refer to a cell range.
When you use a named range to store a numeric or string value you should not prefix the RefersTo parameter with an equal sign (=).
If you do, it is assumed to be a formula and not a constant.
You can retrieve this value by using the Evaluate method:
This named range can then be used on any worksheet to return the total number of items in column D
This named range can only be used on the Sheet1 worksheet to return the total number of items in column E.
Things to Remember
You text strings cannot exceed more than 255 characters.
|Copyright © 2011 Better Solutions Limited. All Rights Reserved.||< Previous | Top | Next >|