| title | Workbook.SheetBeforeDoubleClick event (Excel) | |
|---|---|---|
| keywords | vbaxl10.chm503086 | |
| f1_keywords |
|
|
| api_name |
|
|
| ms.assetid | 69d21025-78ef-deab-39be-b7a092d611f5 | |
| ms.date | 05/29/2019 | |
| ms.localizationpriority | medium |
Occurs when any worksheet is double-clicked, before the default double-click action.
expression.SheetBeforeDoubleClick (Sh, Target, Cancel)
expression An expression that returns a Workbook object.
| Name | Required/Optional | Data type | Description |
|---|---|---|---|
| Sh | Required | Object | A Worksheet object that represents the sheet. |
| Target | Required | Range | The cell nearest to the mouse pointer when the double-click occurred. |
| Cancel | Required | Boolean | False when the event occurs. If the event procedure sets this argument to True, the default double-click action isn't performed when the procedure is finished. |
This event doesn't occur on chart sheets.
This example disables the default double-click action.
Private Sub Workbook_SheetBeforeDoubleClick(ByVal Sh As Object, _
ByVal Target As Range, Cancel As Boolean)
Cancel = True
End Sub[!includeSupport and feedback]