共用方式為


XmlMappedRange.Value Property

Definition

Gets or sets the value of the XmlMappedRange control.

public:
 property System::Object ^ Value { System::Object ^ get(); void set(System::Object ^ value); };
public object Value { get; set; }
member this.Value : obj with get, set
Public Property Value As Object

Property Value

The value of the XmlMappedRange control.

Examples

The following code example demonstrates how to set the Value property with and without the optional parameters. This code example assumes that the current worksheet contains two XmlMappedRange controls named CustomerLastNameCell and CustomerFirstNameCell.

private void SetValue()
{
    this.CustomerLastNameCell.Value = "Hill";
    this.CustomerFirstNameCell.set_Value(
        Excel.XlRangeValueDataType.xlRangeValueDefault, "Chris");
}
Private Sub SetValue()
    Me.CustomerLastNameCell.Value = "Hill"
    Me.CustomerFirstNameCell.set_Value( _
        Excel.XlRangeValueDataType.xlRangeValueDefault, "Chris")
End Sub

Remarks

The Value property can be used with the following optional parameters. If you specify the optional parameters, you must use the set_Value and get_Value accessors in Visual Basic and C#.

Parameter Description
RangeValueDataType One of the XlRangeValueDataType values that specifies the data type of the range value. The default is xlRangeValueDefault.
_arg1 The value of the XmlMappedRange control. This parameter is used only with the set_Value set accessor.

Optional Parameters

For information on optional parameters, see Optional Parameters in Office Solutions.

Applies to