southernsquid
Board Regular
- Joined
- May 19, 2011
- Messages
- 60
I want to be able to double click in a cell and it places a X in the cell. I want to also have that X have a value=1. Better yet I would like to be able to double click and get a color and have the color have a value.
I have a macro for the double click for color but how do I add in a value? Is it even possible?
Here is the macro I have and I should mention, this is the 1st macro I've ever delt with. Please explain exactly how to add any new macros you can provide. Thanks
I have a macro for the double click for color but how do I add in a value? Is it even possible?
Here is the macro I have and I should mention, this is the 1st macro I've ever delt with. Please explain exactly how to add any new macros you can provide. Thanks
Code:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Excel.Range, Cancel As Boolean)
If Target.Interior.ColorIndex = xlNone Then
Target.Interior.ColorIndex = 4
ElseIf Target.Interior.ColorIndex = 4 Then
Target.Interior.ColorIndex = xlNone
End If
Cancel = True
End Sub
Last edited by a moderator: