XmlMappedRange.AddressLocal Property (2007 System)

Gets the range reference of the XmlMappedRange control in the language of the user.

Namespace:  Microsoft.Office.Tools.Excel
Assembly:  Microsoft.Office.Tools.Excel.v9.0 (in Microsoft.Office.Tools.Excel.v9.0.dll)

Syntax

'Declaration
<BrowsableAttribute(False)> _
Public ReadOnly Property AddressLocal As XmlMappedRange._AddressLocalType
'Usage
Dim instance As XmlMappedRange 
Dim value As XmlMappedRange._AddressLocalType 

value = instance.AddressLocal
[BrowsableAttribute(false)]
public XmlMappedRange._AddressLocalType AddressLocal { get; }
[BrowsableAttribute(false)]
public:
property XmlMappedRange._AddressLocalType^ AddressLocal {
    XmlMappedRange._AddressLocalType^ get ();
}
public function get AddressLocal () : XmlMappedRange._AddressLocalType

Property Value

Type: Microsoft.Office.Tools.Excel.XmlMappedRange._AddressLocalType
A string that represents the range reference of the XmlMappedRange control in the language of the user and in R1C1-style or A1-style notation.

Remarks

The AddressLocal property is intended to be used with the following parameters.

Parameter

Description

RowAbsolute

true to return the row as an absolute reference; otherwise, false. The default value is true.

ColumnAbsolute

true to return the column as an absolute reference; otherwise, false. The default value is true.

ReferenceStyle

One of the XlReferenceStyle values.

External

true to return an external reference; false to return a local reference. The default value is false.

RelativeTo

A Range that defines the starting point. If RowAbsolute and ColumnAbsolute are false, and ReferenceStyle is xlR1C1, you must include a starting point for the relative reference.

If you attempt to use AddressLocal without specifying any parameters, AddressLocal will get an XmlMappedRange._AddressLocalType object that is part of the Visual Studio Tools for Office infrastructure and is not intended to be used directly from your code.

Optional Parameters

For information on optional parameters, see The Variable missing and Optional Parameters in Office Solutions.

Examples

The following code example uses the AddressLocal property to display the range location of an XmlMappedRange. The example uses different combinations of the ReferenceStyle, RowAbsolute, ColumnAbsolute and RelativeTo parameters to display the range location in four different formats. The location strings will be localized according to the language of the system it is run on. This code example assumes that the current worksheet contains an XmlMappedRange named CustomerLastNameCell. If the example is run on a system using German language support and CustomerLastNameCell is at cell A2, the example will display the address strings "$A$2", "$A2", "Z2S2", and "Z[-1]S[-1]".

Private Sub DisplayAddressLocal()
    Me.Range("A1").Value2 = _
        Me.CustomerLastNameCell.AddressLocal(True, True, _
        Excel.XlReferenceStyle.xlA1, False)

    Me.Range("A2").Value2 = _
        Me.CustomerLastNameCell.AddressLocal(False, True, _
        Excel.XlReferenceStyle.xlA1, False)

    Me.Range("A3").Value2 = _
        Me.CustomerLastNameCell.AddressLocal(True, True, _
        Excel.XlReferenceStyle.xlR1C1, False)

    Me.Range("A4").Value2 = _
        Me.CustomerLastNameCell.AddressLocal(False, False, _
        Excel.XlReferenceStyle.xlR1C1, False, Me.Cells(3, 3))
End Sub
private void DisplayAddressLocal()
{
    this.Range["A1", missing].Value2 = 
        this.CustomerLastNameCell.AddressLocal[true,
        true, Excel.XlReferenceStyle.xlA1, false, missing];

    this.Range["A2", missing].Value2 = 
        this.CustomerLastNameCell.AddressLocal[false,
        true, Excel.XlReferenceStyle.xlA1, false, missing];

    this.Range["A3", missing].Value2 = 
        this.CustomerLastNameCell.AddressLocal[true,
         true, Excel.XlReferenceStyle.xlR1C1, false, missing];

    this.Range["A4", missing].Value2 = 
        this.CustomerLastNameCell.AddressLocal[false,
        false, Excel.XlReferenceStyle.xlR1C1, false, this.Cells[3, 3]];
}

.NET Framework Security

See Also

Reference

XmlMappedRange Class

XmlMappedRange Members

Microsoft.Office.Tools.Excel Namespace