Hi. Can anyone help with the code to return the cell value to what it was before double-clicking on it, like back-and-forth between the same two values only? Here's my code currently. If my cell value is A and I double-click, I get my B value. What I'd like to do is double-click again and go back to A, and again to B...
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Not Intersect(Target, Range("H2:h53")) Is Nothing Then
Application.EnableEvents = False
If ActiveCell.Value = "A" Then ActiveCell.Value = "B"
End If
Cancel = True
Application.EnableEvents = True
End Sub
Tks
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Not Intersect(Target, Range("H2:h53")) Is Nothing Then
Application.EnableEvents = False
If ActiveCell.Value = "A" Then ActiveCell.Value = "B"
End If
Cancel = True
Application.EnableEvents = True
End Sub
Tks