Disable Doubleclick for a range

  • Thread starter Thread starter Brandon
  • Start date Start date
B

Brandon

I am trying to disable the mouse doubleclick for a
certain range of cells (e.g. A1:A10), not the entire
workbook as the "Application.EditDirectlyInCell = False"
does. I have been spinning my wheels so any help on this
would be very much appreciated.

Thanks,
Brandon
 
This is a duplicate. Thanks Rob, Vasant, Patrick, and
John for your assistance. I will try those and let you
know if they worked.

Thanks again,
Brandon
 
Brandon,

Try something like the following in the code module for the
appropriate worksheet.

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range,
Cancel As Boolean)
If Not Application.Intersect(Range("A1:A10"), Target) Is Nothing
Then
Cancel = True
End If
End Sub


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
Back
Top