Exit a script

Hi have script that throws up a dialog.
The script then acts according to the response.
I want the following if the cancel button is hit:

if RetVal = 0 then
' Exit the script
End If

Is there such a command?
Using VB (I know I know..... :slight_smile: )

Thanks as always

Exit Function will exit the function you are in, I think. (It's been a while.)