Change Highlight Color Excel 2007


/ Published in: Visual Basic

Use this code to change the default highlight color for a cell in excel 2007. Right click on the sheet name and click view code, Paste this code into the module that comes up.


Copy this code and paste it in your HTML
  1. Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
  2. Static OldCell As Range
  3. If Not OldCell Is Nothing Then
  4. OldCell.Interior.ColorIndex = xlColorIndexNone
  5. End If
  6. Target.Interior.ColorIndex = 6 'yellow
  7. Set OldCell = Target
  8. End Sub

URL: http://www.excelforum.com/excel-new-users/487299-change-highlight-color-on-active-cells.html

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.