cheesiepoof05
Board Regular
- Joined
- Dec 30, 2010
- Messages
- 82
Hello all,
I have some code that I use to highlight the first column and row of the active cell I'm in to make it easier to see. Then when I click out of that cell it removes the highlighted that it had added and highlights the new location. The code is baked into the tab itself by right clicking on sheet name and selecting view code. My problem is that some of my workbooks have conditional formatting that overrides my highlighting macro. Is there a way around this conundrum? Thank you
Current code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Rows("1:1").Interior.ColorIndex = xlNone
Columns(1).Interior.ColorIndex = xlNone
Cells(ActiveCell.Row, 1).Interior.ColorIndex = 33
Cells(1, ActiveCell.Column).Interior.ColorIndex = 33
End Sub
I have some code that I use to highlight the first column and row of the active cell I'm in to make it easier to see. Then when I click out of that cell it removes the highlighted that it had added and highlights the new location. The code is baked into the tab itself by right clicking on sheet name and selecting view code. My problem is that some of my workbooks have conditional formatting that overrides my highlighting macro. Is there a way around this conundrum? Thank you
Current code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Rows("1:1").Interior.ColorIndex = xlNone
Columns(1).Interior.ColorIndex = xlNone
Cells(ActiveCell.Row, 1).Interior.ColorIndex = 33
Cells(1, ActiveCell.Column).Interior.ColorIndex = 33
End Sub