I am trying to find a code that can allow a double click (only in one specified column) to result in a check mark in that cell and a strike-through for the rest of the row.
I found a template in excel that has this code but it does not copy over to other tabs when duplicated - even when i change the tab name in the code. What am i doing wrong? Here is the code:
Option Explicit
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
On Error Resume Next
With Application
.Cursor = xlNorthwestArrow
BooleanCellDoubleClick Target, [tblToDoList[[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
Moderator's note: Please take the time to review our rules. There aren't many, and they are all important. Rule #3 requires code tags. I have added them for you this time because you are a new member. --6StringJazzer
Bookmarks