Reset previous active cell

  • I have some code below which changes the background colour and capitalises the active cell. When I click on another cell the previous cell is still capitalised. Could someone please modify the code so that the previous cell isn't capitals nor bold anymore.
    Many thanks


    Code
    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    Application.ScreenUpdating = False
    Cells.Interior.ColorIndex = 0
    Target.Interior.Color = vbCyan
    Target.Formula = UCase$(Target.Formula)
    Target.Font.bold = True
    Application.ScreenUpdating = True
    End Sub
  • Try this (in sheet module)

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!