السلام عليكم هذا الكود يقوم بتلوين الصف عند الوقوف على الخلية
المشكلة انه بيمسح اي حاجه انا عملت عليها لون عشان ارجعلها بعد كده
Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
'Update 20140318
Static xRow
Static xColumn
If xColumn <> "" Then
With Columns(xColumn).Interior
.ColorIndex = xlNone
End With
With Rows(xRow).Interior
.ColorIndex = xlNone
End With
End If
pRow = Selection.Row
pColumn = Selection.Column
xRow = pRow
xColumn = pColumn
With Rows(pRow).Interior
.ColorIndex = 4
.Pattern = xlSolid
End With
End Sub
الملف المرفق
الكود يلغي الخلايا الملونه بالاسود
تلوين الصف.xlsm