Changing the text color of a complete row ...
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
Dim i As Long
With Worksheets("Sheet1")
For i = 1 To Cells(Rows.Count, "A").End(xlUp).Row
If .Cells(i, "A").Value < "" Then
.Rows(i).Interior.ColorIndex = 3
End If
Next i
End With
End Sub
'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code
--
HTH
Bob Phillips
"Rob Keel" wrote in message
oups.com...
Looking for a solution please ... Before a workbook is saved, I would
like excel to check the contents of cells in column A and if the cell
is not empty then I would like excel to change the text color for the
complete row to a different color (automatic to red for example).
Can anyone offer a solution to this please?
Many thanks for you help.
Rob.
|