kellydanthuy
New Member
- Joined
- Jan 30, 2024
- Messages
- 1
- Office Version
- 365
- Platform
- Windows
Hi All,
How can I update the code below if I would like to add one more column as picture?
Thank you for you all advice.
Option Explicit
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
On Error Resume Next
With Application
.Cursor = xlNorthwestArrow
BooleanCellDoubleClick Target, [Checklist_Table[[Done]]], Cancel
.Cursor = xlDefault
End With
End Sub
Private Sub BooleanCellDoubleClick(rTarget As Range, rValidRange As Range, Cancel As Boolean)
On Error Resume Next
Application.CellDragAndDrop = False
If rTarget.Cells.Count > 1 Then Exit Sub
If Intersect(rTarget, rValidRange) Is Nothing Then Exit Sub
If Len(rTarget) Then
rTarget = vbNullString
Else
rTarget = 1
End If
Cancel = True
End Sub