

ببخشید حواسم به این موضوع نبود
این کد اصلاح شده است
کد PHP:
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Dim CelValue As Variant
Dim Vtxt As String
On Error GoTo ExitHandeler
Vtxt = Target.Value
Application.EnableEvents = False
CelValue = Target.Value
Application.Undo
If Target.Value <> "" Then
If Target.Value <> CelValue Then
Target.Interior.ColorIndex = 6
Target.Value = CelValue
End If
Else
Target.Value = CelValue
End If
ExitHandeler:
Application.EnableEvents = True
End Sub
کامنت