Worksheet BeforeDouble ClickByVal Target As Range Cancel As Boolean

Worksheet_BeforeDoubleClick allows control over what happens when the user double-clicks on the sheet. Target is the selected range on the sheet; Cancel is set to False by default, but if set to True, it prevents the default action (such as entering a cell) from happening.

The following code prevents the user from entering a cell with a double-click. And if the formula field is also hidden, the user cannot enter information in the traditional way:

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, _

Cancel As Boolean) Cancel = True End Sub

0 0

Post a comment