View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default Evaluate cell in range and change cell attribute

What error because there's nothing wrong with the code

Mike

"S Himmelrich" wrote:

I've been working on the following code, but get an error on the
designated line - can someone help?

Dim rCell As Range
Sheets("Form").Select
Range("B2:C450").Select
For Each rCell In Selection.Cells
If rCell.Interior.ColorIndex = 35 And rCell.Value = "" Then <---
ERROR OCCURS
rCell.Borders.Color = 3
End If
Next rCell