Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) On Error Resume Next With Application .Cursor = xlNorthwestArrow BooleanCellDoubleClick Target, [tblToDoList[[完成]]], 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