Aracılığıyla paylaş


XmlMappedRange.BeforeDoubleClick Olay

Oluşur, bir XmlMappedRange Denetim çift, önce varsayılan çift eylem.

Ad alanı:  Microsoft.Office.Tools.Excel
Derleme:  Microsoft.Office.Tools.Excel (Microsoft.Office.Tools.Excel.dll içinde)

Sözdizimi

'Bildirim
Event BeforeDoubleClick As DocEvents_BeforeDoubleClickEventHandler
event DocEvents_BeforeDoubleClickEventHandler BeforeDoubleClick

Örnekler

Aşağıdaki kod bir işleyicisi gösterir BeforeDoubleClick çift tıklatma eylemi iptal eden olay bir XmlMappedRange. Çift için izin verilmeyen kullanıcı olay işleyicisi bildirir XmlMappedRangeve Cancel parametresi DocEvents_BeforeDoubleClickEventHandler olay işleyicisine true , Microsoft Office Excel iptal eder çift tıklatma eylemi. Bu kod örneği, geçerli çalışma sayfasının içerdiğini varsayar bir XmlMappedRange adlı CustomerLastNameCell.

Sub CustomerLastNameCell_BeforeDoubleClick(ByVal Target As Excel.Range, _
    ByRef Cancel As Boolean) Handles CustomerLastNameCell.BeforeDoubleClick
    MsgBox("Double-clicking in this range is not allowed.")
    Cancel = True
End Sub
private void XmlMappedRange_BeforeDoubleClick()
{
    this.CustomerLastNameCell.BeforeDoubleClick += 
        new Excel.DocEvents_BeforeDoubleClickEventHandler(
        CustomerLastNameCell_BeforeDoubleClick);
}

void CustomerLastNameCell_BeforeDoubleClick(Excel.Range Target, 
    ref bool Cancel)
{
    MessageBox.Show("Double-clicking in this range " +
        " is not allowed.");
    Cancel = true;
}

.NET Framework Güvenliği

Ayrıca bkz.

Başvuru

XmlMappedRange Arabirim

Microsoft.Office.Tools.Excel Ad Alanı