Hello All,
I am using IF condition in Excel with a message displayed, but the msg is getting displayed in loop hanging the excel.
Private Sub Worksheet_Change (By Val Target As Range)
If Range ("Status") = "PY"
MsgBoxClick = MsgBox ("Data cannot be submitted".)
End If
End Sub
When the value is PY, it keeps displaying Msg. Even after clicking ok, it keeps displaying msg and I am not able to do any other operation and have to close excel.
Please help me on how can the msg be displayed only once and come out of loop / or go to else condition.
Thanks in advance
I am using IF condition in Excel with a message displayed, but the msg is getting displayed in loop hanging the excel.
Private Sub Worksheet_Change (By Val Target As Range)
If Range ("Status") = "PY"
MsgBoxClick = MsgBox ("Data cannot be submitted".)
End If
End Sub
When the value is PY, it keeps displaying Msg. Even after clicking ok, it keeps displaying msg and I am not able to do any other operation and have to close excel.
Please help me on how can the msg be displayed only once and come out of loop / or go to else condition.
Thanks in advance