Megosztás a következőn keresztül:


NamedRange.PrefixCharacter Property (2007 System)

Gets the prefix character for the NamedRange control.

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 PrefixCharacter As Object
'Usage
Dim instance As NamedRange 
Dim value As Object 

value = instance.PrefixCharacter
[BrowsableAttribute(false)]
public Object PrefixCharacter { get; }
[BrowsableAttribute(false)]
public:
property Object^ PrefixCharacter {
    Object^ get ();
}
public function get PrefixCharacter () : Object

Property Value

Type: System.Object
The prefix character for the NamedRange control.

Remarks

If the value of the TransitionNavigKeys property is false, this prefix character is ' for a text label, or blank. If the value of the TransitionNavigKeys property is true, this character is ' for a left-justified label, " for a right-justified label, ^ for a centered label, \ for a repeated label, or blank.

Examples

The following code example uses the PrefixCharacter property to display the prefix character for a NamedRange.

This example is for a document-level customization.

Private prefixRange As Microsoft.Office.Tools.Excel.NamedRange

Private Sub DisplayPrefixCharacter()
    prefixRange = Me.Controls.AddNamedRange( _
        Me.Range("C1"), "prefixRange")
    If CStr(Me.prefixRange.PrefixCharacter) = "" Then
        MessageBox.Show("The prefix character is blank.")
    Else
        MessageBox.Show("The prefix character is: " & _
            Me.prefixRange.PrefixCharacter)
    End If 
End Sub
Microsoft.Office.Tools.Excel.NamedRange prefixRange;
private void DisplayPrefixCharacter()
{
    prefixRange = this.Controls.AddNamedRange(
         this.Range["C1", missing], "prefixRange");
    if ((string)this.prefixRange.PrefixCharacter == "")
    {
        MessageBox.Show("The prefix character is blank.");
    }
    else
    {
        MessageBox.Show("The prefix character is: " +
            this.prefixRange.PrefixCharacter);
    }
}

.NET Framework Security

See Also

Reference

NamedRange Class

NamedRange Members

Microsoft.Office.Tools.Excel Namespace