frisbeelee
New Member
- Joined
- Aug 5, 2013
- Messages
- 4
I have an excel database which doesn't need any inputs but users can change things if they want (weight of an item for example) which can impact results.
I just need vba to color the cell if the user changes it. I think perhaps it's too simple because I can't find this direct question anywhere!
This is what I got
Private Sub Worksheet_Change(ByVal Target As Range)
Dim RangetoChange As Range
Set RangetoChange = Range("N5:N1000")
If Not Intersect(Target, RangetoChange) Is Nothing Then
Target.Interior.Color = 65535
End If
End Sub
Currently I get Run-time error '1004': application-defined or object-defined error
I just need vba to color the cell if the user changes it. I think perhaps it's too simple because I can't find this direct question anywhere!
This is what I got
Private Sub Worksheet_Change(ByVal Target As Range)
Dim RangetoChange As Range
Set RangetoChange = Range("N5:N1000")
If Not Intersect(Target, RangetoChange) Is Nothing Then
Target.Interior.Color = 65535
End If
End Sub
Currently I get Run-time error '1004': application-defined or object-defined error