Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Evaluate cell in range and change cell attribute
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Evaluate cell in range and change cell attribute
I get a type mismatch
if I put this line I still get an object error If rCell.Interior.ColorIndex = 35 And rCell.Value Is Null Then Not sure what is going on...humm... On Apr 9, 5:04*pm, Mike H wrote: 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- Hide quoted text - - Show quoted text - |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Evaluate cell in range and change cell attribute
That's different than the code you posted yesterday when you were using ""
try this line If rCell.Interior.ColorIndex = 35 And IsNull(rCell.Value) Then Mike "S Himmelrich" wrote: I get a type mismatch if I put this line I still get an object error If rCell.Interior.ColorIndex = 35 And rCell.Value Is Null Then Not sure what is going on...humm... On Apr 9, 5:04 pm, Mike H wrote: 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- Hide quoted text - - Show quoted text - |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Evaluate cell in range and change cell attribute
Thank you for your response, this didn't work either.
On Apr 10, 6:13*am, Mike H wrote: That's different than the code you posted yesterday when you were using "" try this line If rCell.Interior.ColorIndex = 35 And IsNull(rCell.Value) Then Mike "S Himmelrich" wrote: I get a type mismatch if I put this line I still get an object error * * If rCell.Interior.ColorIndex = 35 And rCell.Value Is Null Then Not sure what is going on...humm... On Apr 9, 5:04 pm, Mike H wrote: 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- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text - |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Caption attribute at Cell in Excel XML | Excel Discussion (Misc queries) | |||
Evaluate Range of Cell | Excel Programming | |||
How to write vba to evaluate the text font and size on an active cell range? | Excel Programming | |||
Push value to a cell attribute? | Excel Programming | |||
Change cell colour for a cell or range within a predefined range | Excel Programming |