View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
MarkyB MarkyB is offline
external usenet poster
 
Posts: 12
Default flash cell colours from white to red and back again

When a check box is ticked, I would like to automatically change any whote
cells to red, throw up the MsgBox and then change the red back again to
white. When I call the macro I get a run-time error '438'. My code that I am
trying to use is:

Public Sub PriorityWarning()

With Sheets(1)
Cells.Select
If .BackColor = RGB(255, 255, 255) Then
.BackColor = RGB(255, 51, 0)
End If
MsgBox "Priority EPCON1!", vbOKOnly, "EPCON LEVEL"
If .BackColor = RGB(255, 51, 0) Then
.BackColor = RGB(255, 255, 255)
End If
End With

End Sub

Thanks,

Mark