Forum Discussion
Hilighting Rows on rollover
- Apr 10, 2018
If by "format rows" you mean the active cell's entire row, from columns A to XFD, shall be highlighted upon selection, you can right-click your worksheet tab, left click View Code, and paste the following procedure into the large white area that is the worksheet module. To return to the worksheet, press Alt+Q.
This code will nullify any pre-existing interior celll colors but will leave Conditional Formatted cells alone. Conversely, you can do this with CF to leave all pre-existing interior color formats intact; if that is what you want instead, please post back.
It will also nullify your Undo stack.
If you have not already done so, save as your workbook for the macro-enabled extension format .xlsm.
Here's the code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range) Application.ScreenUpdating = False Cells.Interior.ColorIndex = 0 Target.EntireRow.Interior.Color = vbCyan Application.ScreenUpdating = True End Sub
If by "format rows" you mean the active cell's entire row, from columns A to XFD, shall be highlighted upon selection, you can right-click your worksheet tab, left click View Code, and paste the following procedure into the large white area that is the worksheet module. To return to the worksheet, press Alt+Q.
This code will nullify any pre-existing interior celll colors but will leave Conditional Formatted cells alone. Conversely, you can do this with CF to leave all pre-existing interior color formats intact; if that is what you want instead, please post back.
It will also nullify your Undo stack.
If you have not already done so, save as your workbook for the macro-enabled extension format .xlsm.
Here's the code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range) Application.ScreenUpdating = False Cells.Interior.ColorIndex = 0 Target.EntireRow.Interior.Color = vbCyan Application.ScreenUpdating = True End Sub
Thanks so much Thomas! It worked. I feel like an official coder. Ahem, well almost