This should do it:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
For Each cell In Range("A1:F6000")
If cell.Interior.ColorIndex = 44 Then
MsgBox "Sheet has Orange Cells"
End If
Next
End Sub
Chas
"scottnshelly" wrote:
>
> I want a message box to pop up if there are any orange cells on sheet1.
> The click event will be BeforeSave. I have some conditional formatting
> that changes a cell to orange. I don't want the user to be able to
> save if there is orange on the sheet. The orange can appear in
> A1:F6000.
>
> What does the If statement look like for this scenario?
>
> Thanks.
>
>
> --
> scottnshelly
> ------------------------------------------------------------------------
> scottnshelly's Profile: http://www.excelforum.com/member.php...fo&userid=7301
> View this thread: http://www.excelforum.com/showthread...hreadid=570535
>
>
Bookmarks