Export (0) Print
Expand All
Expand Minimize

Range.Value Property 

Returns or sets the value of the specified range.

Namespace: Microsoft.Office.Interop.Excel
Assembly: Microsoft.Office.Interop.Excel (in microsoft.office.interop.excel.dll)

'Usage
Dim range1 As Range

Dim key As Object
Dim returnValue As Object
returnValue = range1.Value(key)

Dim sampleValue As Object
range1.Value(key) = sampleValue

object this[
	[In, Optional] object RangeValueDataType
] {get; set;}
public System.Object get_Item(
	/*in*/System.Object RangeValueDataType
);
public void set_Item(
	/*in*/System.Object RangeValueDataType
System.Object);
In JScript, you can use Indexed Properties defined by a class, but you cannot define your own.

Parameters

RangeValueDataType

Optional Object. The range value data type. Can be one of the following XlRangeValueDataType constants:

  • xlRangeValueDefaultdefault If the specified Range object is empty, returns the value Empty (use the IsEmpty function to test for this case). If the Range object contains more than one cell, returns an array of values (use the IsArray function to test for this case).

  • xlRangeValueMSPersistXML Returns the recordset representation of the specified Range object in an XML format.

  • xlRangeValueXMLSpreadsheet Returns the values, formatting, formulas, and names of the specified Range object in the XML Spreadsheet format.

When setting a range of cells with the contents of an XML spreadsheet file, only values of the first sheet in the workbook are used. You cannot set or get a noncontiguous range of cells in the XML spreadsheet format.


Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, and Windows 2000

Target Platforms

Community Additions

ADD
Show:
© 2014 Microsoft