次の方法で共有


NamedRange.PrefixCharacter Property

Definition

Gets the prefix character for the NamedRange control.

public:
 property System::Object ^ PrefixCharacter { System::Object ^ get(); };
public object PrefixCharacter { get; }
member this.PrefixCharacter : obj
Public ReadOnly Property PrefixCharacter As Object

Property Value

The prefix character for the NamedRange control.

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.

Microsoft.Office.Tools.Excel.NamedRange prefixRange;
private void DisplayPrefixCharacter()
{
    prefixRange = this.Controls.AddNamedRange(
         this.Range["C1"], "prefixRange");
    if ((string)this.prefixRange.PrefixCharacter == "")
    {
        MessageBox.Show("The prefix character is blank.");
    }
    else
    {
        MessageBox.Show("The prefix character is: " +
            this.prefixRange.PrefixCharacter);
    }
}
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

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.

Applies to