![]() To only highlight the active column, remove or comment out this line.To only highlight the active row, remove or comment out this line.To get the row and column colored in the same way, use the same color index number for both.To change the highlight color, just replace those with any ColorIndex codes of your choosing. Our sample code uses two different colors demonstrated in the above gif - color index 38 for row and 24 for column.If you'd like to customize the code for your needs, these small tips may come in handy: ![]() 'Highlight row and column of the selected cellĪpplication.ScreenUpdating = True End Sub Customizing the code Private Sub Worksheet_SelectionChange( ByVal Target As Range)Īpplication.ScreenUpdating = False 'Clear the color of all cells
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |