Evaluate Method

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

expression.Evaluate(Name)

expression    Required. An expression that returns a Microsoft Graph Application object.

Name    Required String. The name of the specified object, using the Microsoft Graph naming convention.

Remarks

You can use the following types of names in Microsoft Graph with this method:

Note  Using square brackets (for example, "[A1:C5]") is identical to calling the Evaluate method with a string argument. For example, the following expressions are equivalent:

myChart.Application.[a1].Value = 25
myChart.Application.Evaluate("A1").Value = 25
		

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 Visual Basic variable.

Example

This example clears cell A1 on the datasheet.

clearCell = "A1"
myChart.Application.Evaluate(clearCell).Clear