View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
[email protected] alanstevenson70@gmail.com is offline
external usenet poster
 
Posts: 2
Default Code to format cells on several worksheets

Claus

That worked a treat! Thank you very much

Steve

On Wednesday, January 22, 2014 2:56:44 PM UTC, Claus Busch wrote:

try this code in the code module of "ThisWorkbook":



Private Sub Workbook_SheetActivate(ByVal Sh As Object)

With Sh

With .Range("A1")

.Font.ColorIndex = 51

.Value = "KEEP THIS TEXT"

End With

With .Range("A1:B1")

.Interior.Color = RGB(211, 206, 177)

.Locked = True

End With

End With

End Sub





Regards

Claus B.

--

Win XP PRof SP2 / Vista Ultimate SP2

Office 2003 SP2 /2007 Ultimate SP2