Hi,
First post so please bear with me... my excel vba experience is very limited, but I have worked in word vba
I want to be able to double-click on a cell and change the background fill color to red (simple enough ) but I also want to change the adjacent cell (column) fill to yellow. I have tried but something is just not right...
Please note, I tried this with conditional formatting and a checkbox but it was getting too bulky (different question I know).
Hear is what I have tried... again please be kind... probably a rookie error but I just can't see it...
Thanks in advance...
SF
First post so please bear with me... my excel vba experience is very limited, but I have worked in word vba
I want to be able to double-click on a cell and change the background fill color to red (simple enough ) but I also want to change the adjacent cell (column) fill to yellow. I have tried but something is just not right...
Please note, I tried this with conditional formatting and a checkbox but it was getting too bulky (different question I know).
Hear is what I have tried... again please be kind... probably a rookie error but I just can't see it...
Thanks in advance...
SF
VBA Code:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Set myCalendar = Range("A1:EB41")
If Target.Interior.ColorIndex = 3 Then
Target.Interior.ColorIndex = xlNone
Else
Target.Interior.ColorIndex = 3
For Each cell In myCalendar
If
cell.Interior.ColorIndex = 3
Then
cell.Offset(0, 1).Interior.ColorIndex = 6
End If
End If
Cancel = True
End Sub