Reputation: 103
Is it possible to do, that if you select a cell, and it is colored red, a MsgBox
would pop out?
I tried something like this:
Sub isitred()
If ActiveCell = "vbRed" Then
MsgBox "ActiveCell is Red"
End If
End Sub
But it doesnt work... Any ideas?
Upvotes: 0
Views: 1035
Reputation: 4848
You can try:
If ActiveCell.Interior.Color = vbRed Then
MsgBox ...
End If
If vbRed is not defined, you can use the value of 255.
Upvotes: 2