Hi,
I have written a VBA code and it works perfectly fine untill I insert an entire row to the exisitng sheet. The code doesn't work for that new cell I have inserted but works fine for other cells. Any suggestion are apprecited.
Thanks
Ghouse
This is the code to highlight the cell and make the font bold if checkbox is checked.
Private Sub CheckBox1_Click()
Range("C5").Select
Do Until Selection.Offset(1, 0).Value = ""
Selection.Offset(1, 0).Select
If CheckBox1 = True Then
If Selection.Value = Range("I5") Then
With Selection.Font
.ColorIndex = 3
.Bold = True
End With
End If
Else
Selection.Font.ColorIndex = 0
Selection.Font.Bold = False
End If
Loop
Range("C3").Select
End Sub
Would you provide me the link to VBA forum.
Thanks
Ghouse
I tried to recreate your problem but couldn't. Where are you inserting the new row? The macro begins reading cells in column C starting at C6 looking for a match to I5, and quits after encountering a blank cell.