hi,
here is code that will do that. but without a better understanding of what
you are doing, i am not sure which event would be best. here i used the sheet
change event.
you may wish to conside the before save event or the before close event and
set cancel to true . that way the user will not be able save or close the
file untill your criteria is met.
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
If Range("G8").Value = "" Then
Exit Sub
Else
If Range("G8").Value < "" And _
Range("J8").Value = "" Then
MsgBox ("this is a message")
End If
End If
End Sub
regards
FSt1
"Vlad999" wrote:
Hi
I am trying to make a message box appear automatically based on 2
conditions, so basically if cell range G8 has a value in it then check
cell J8 if J8 is blank then the message box pops up and keeps poping up
till a value is entered. But if G8 is empty then nothing happens.
Little help?
Thanks
--
Vlad999
------------------------------------------------------------------------
Vlad999's Profile: http://www.excelforum.com/member.php...o&userid=33586
View this thread: http://www.excelforum.com/showthread...hreadid=549771