_Application.Evaluate Method

Converts a Microsoft Excel name to an object or a value.

Namespace:  Microsoft.Office.Interop.Excel
Assembly:  Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)

Syntax

'Declaration
Function Evaluate ( _
    Name As Object _
) As Object
'Usage
Dim instance As _Application
Dim Name As Object
Dim returnValue As Object

returnValue = instance.Evaluate(Name)
Object Evaluate(
    Object Name
)

Parameters

  • Name
    Type: System.Object

    Required Object. The name of the object, using the naming convention of Microsoft Excel.

Return Value

Type: System.Object

Remarks

The following types of names in Microsoft Excel can be used with this method:

  • A1-style references. You can use any reference to a single cell in A1-style notation. All references are considered to be absolute references.

  • Ranges. You can use the range, intersect, and union operators (colon, space, and comma, respectively) with references.

  • Defined names. You can specify any name in the language of the macro.

  • External references. You can use the ! operator to refer to a cell or to a name defined in another workbook — for example, Evaluate("[BOOK1.XLS]Sheet1!A1").

Note

Using square brackets (for example, "[A1:C5]") is identical to calling the Evaluate method with a string argument. The advantage of using square brackets is that the code is shorter. The advantage of using Evaluate is that the argument is a string, so you can either construct the string in your code or use a variable.

See Also

Reference

_Application Interface

_Application Members

Microsoft.Office.Interop.Excel Namespace