Colourindex changes by changing cell value
Is there another, preferably faster method?
Maybe a bit off-topic, but faster and preferably in terms of development and
maintenance would be - IMO - to use named references instead of hardcoding the
ranges.
For example:
'-----
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Dim CheckRange As Range
Set CheckRange = Application.Union( _
Range("megaRange"), _
Range("megaRange2"), _
Range("megaRange3"))
If Intersect(Target, CheckRange) Is Nothing Then Exit Sub
MsgBox "OK"
End Sub
'-----
The above code responds instantaneously with the ranges in the original message
defined as names (entire columns), from H:H to DN:DN. The worksheet is otherwise
empty though.
Best regards,
Anders Silvén
|