共用方式為


XmlMappedRange.Creator Property

Definition

Gets a value that indicates the application in which this XmlMappedRange control was created.

public:
 property Microsoft::Office::Interop::Excel::XlCreator Creator { Microsoft::Office::Interop::Excel::XlCreator get(); };
public Microsoft.Office.Interop.Excel.XlCreator Creator { get; }
member this.Creator : Microsoft.Office.Interop.Excel.XlCreator
Public ReadOnly Property Creator As XlCreator

Property Value

One of the XlCreator values.

Examples

The following code example uses the Creator property to determine whether an XmlMappedRange was created in Microsoft Office Excel. This code example assumes that the current worksheet contains an XmlMappedRange named CustomerLastNameCell.

private void DisplayCreator()
{
    if (this.CustomerLastNameCell.Creator == Excel.XlCreator.xlCreatorCode)
    {
        MessageBox.Show("This XmlMappedRange was created in " +
            "Microsoft Office Excel.");
    }
    else
    {
        MessageBox.Show("This XmlMappedRange was not created in " +
            "Microsoft Office Excel.");
    }
}
Private Sub DisplayCreator()
    If Me.CustomerLastNameCell.Creator = Excel.XlCreator.xlCreatorCode Then
        MsgBox("This XmlMappedRange was created in " & _
            "Microsoft Office Excel.")
    Else
        MsgBox("This XmlMappedRange was not created in " & _
            "Microsoft Office Excel.")
    End If
End Sub

Remarks

Because the XmlMappedRange control was created in Microsoft Office Excel, this property returns the string XCEL, which is equivalent to the hexadecimal number 5843454C.

Applies to