Thread: Dialog Boxes
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
FSt1 FSt1 is offline
external usenet poster
 
Posts: 3,942
Default Dialog Boxes

hi
assuming your cells to equal are b1 and c1(change if needed), try this...
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
If Range("B1").Value < Range("C1").Value Then
MsgBox ("Reimbursable data does not equal!!")
Cancel = True
End If

End Sub

this is before save event which means they can't save the file untill the 2
cells are equal.
if that is undesirable then you might want to concider the before close
event where they wont be able to close the file until the 2 cells are equal.

Regards
FSt1

"stacy05" wrote:

I don't know if this is possible in Excel, but here is what I want to do.

I want to create a "check" for the users. Basically 2 cells need to equal
eachother before they can sumbit the worksheet. What I would like to happen
is if the 2 cells don't equal a dialog block pops up saaying "Reimbursable
data does not equal!!".

Is this possible?

Thanks in advance!
Stacy