VB excel 2016

Private Sub Worksheet_Change(ByVal Target As Range)
Dim WatchRange As Range
Set WatchRange = Me.Columns(“A:E”) ‘ Overvåg kun kolonner A-E
On Error Resume Next
If Not Intersect(Target, WatchRange) Is Nothing Then
Application.EnableEvents = False
Target.Value = Target.Value ‘ Bevar kun værdier, fjern formatering
Application.EnableEvents = True
End If
End Sub

Skriv et svar