In a post dated June 2006 phxsportz provided code to change cell color by clicking it.
I tried the code it did what it was supposed to do, but it worked on every sheet & cell that was clicked.
I was wondering if it is possible to do the following to a selected group of cells on a certain worksheet. Click on the cell & it turns red, double click & it returns to the previous color, and not the default color.
Code:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Cancel = True
Target.Interior.ColorIndex = IIf(Target.Interior.ColorIndex >= 3, -4142, 3)
End Sub
I tried the code it did what it was supposed to do, but it worked on every sheet & cell that was clicked.
I was wondering if it is possible to do the following to a selected group of cells on a certain worksheet. Click on the cell & it turns red, double click & it returns to the previous color, and not the default color.