Code: Select all
res:= MsgBox("Press Esc!")
MsgBox("User pressed : " res)
In this case MsgBox must return "" (nothing) when pressed "Esc" or clicked on "X".
Code: Select all
res:= MsgBox("Press Esc!",,"OC")
MsgBox("User pressed : " res)
Suggestion:
If MsgBox closed with "X" then return ""
If MsgBox have option "Cancel" then when pressed "Esc" return "Cancel" else return "".
Best: when "Esc" or "X" return ""