View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.programming
Gord Gord is offline
external usenet poster
 
Posts: 86
Default Change Format of Active Cell

This code wipes any existing formatting from cells.

See code in my reply to your post to me.


Gord

On Fri, 15 Jul 2011 18:32:25 -0400, GS wrote:

Example code...

In the module behind the sheet... (right-click sheet tab and choose
'View Code' from the popup menu)

Option Explicit

Dim msActiveAddr As String

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If msActiveAddr < "" Then Range(msActiveAddr).ClearFormats
Target.Interior.Color = vbRed: msActiveAddr = Target.Address
End Sub