This documentation is archived and is not being maintained.

Workbook.SheetBeforeDoubleClick Event

Office 2007
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.


NameRequired/OptionalData TypeDescription
ShRequiredObject A Worksheet object that represents the sheet.
TargetRequiredRangeThe cell nearest to the mouse pointer when the double-click occurred.
CancelRequiredBooleanFalse 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.

Visual Basic for Applications
Private Sub Workbook_SheetBeforeDoubleClick(ByVal Sh As Object, _
        ByVal Target As Range, ByVal Cancel As Boolean)
    Cancel = True
End Sub