Change fill color after input automatically

B

bobocat

Hi

Do you have any suggustion for the following task.
I will make new entries to the excel list frequently. I hope that after I
input something in column A, the fill color of the entire row will change
automatically to indicate that it is a new enter. And before I close the
file, I will change back the fill color to transparent.

I recoreded a macro to change the fill color, but how can I run this macro
when I finsih input data in Column A (every worksheet)?

With best regards,
Bobocat
 
S

Scoops

bobocat said:
I recoreded a macro to change the fill color, but how can I run this macro
when I finsih input data in Column A (every worksheet)?

Hi bobocat

Right-click the tab of a worksheet and click View Code.

Paste this in vb editor

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 1 Then
Target.EntireRow.Interior.Color = vbRed 'or whatever colour you
wish
End If
End Sub

Double-click ThisWorkbook and paste this:

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Dim wks As Worksheet
For Each wks In Worksheets
wks.Cells.Interior.ColorIndex = xlNone
Next
End Sub


Regards

Steve
 
B

Bobocat

thank you.

Scoops said:
Hi bobocat

Right-click the tab of a worksheet and click View Code.

Paste this in vb editor

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 1 Then
Target.EntireRow.Interior.Color = vbRed 'or whatever colour you
wish
End If
End Sub

Double-click ThisWorkbook and paste this:

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Dim wks As Worksheet
For Each wks In Worksheets
wks.Cells.Interior.ColorIndex = xlNone
Next
End Sub


Regards

Steve
 
Top