dstrickland91
New Member
- Joined
- Jun 12, 2015
- Messages
- 19
All,
I have a portion of code that I use in a few different modules, So I tweak the columns it applies to for each one. But when I use it, I notice it tends to add almost 3-4secs to whatever code I have it in. All it does is apply a thick bottom border to a specified range when another range changes value. Any ideas why such a simple function is so slow?
Dim rng As Range
For Each rng In Range("f:f" & lastrow)
If rng <> rng.Offset(1, 0) Then
Range("A" & rng.Row & ":G" & rng.Row).Borders(xlEdgeBottom).Weight = xlThick
End If
Next rng
I have a portion of code that I use in a few different modules, So I tweak the columns it applies to for each one. But when I use it, I notice it tends to add almost 3-4secs to whatever code I have it in. All it does is apply a thick bottom border to a specified range when another range changes value. Any ideas why such a simple function is so slow?
Dim rng As Range
For Each rng In Range("f:f" & lastrow)
If rng <> rng.Offset(1, 0) Then
Range("A" & rng.Row & ":G" & rng.Row).Borders(xlEdgeBottom).Weight = xlThick
End If
Next rng