Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Detecting if cancel key is pressed in ALERT command 1

Status
Not open for further replies.

wendymason

IS-IT--Management
Mar 24, 2004
6
0
0
GB
I need a macro to detect whether the cancel key is pressed or not. I want the macro to branch depending on whether the ok key or cancel key is pressed. Can anyone help. Thanks
 
{ALERT "Message";2;;choice}
{IF choice=0}{BRANCH cancelRoutine}
{OKroutine}
 
Thanks crazbird, I also need something for the GETLABEL command, can you help?
 
You should be able to adapt my previous macro for use with get label by studying the online help for that command (in R5) which I'm copying in below:

{GET-LABEL [prompt];result;[default];[title];[x];[y]}

Lets the user enter anything that you want 1-2-3 to store in the worksheet as a label.

· If the user types data in the text box and chooses OK, 1-2-3 enters the contents of the text box as a left-aligned label in result.
· If the user types nothing in the text box and chooses OK when the text box is blank, 1-2-3 enters the ' (apostrophe) label-prefix character in result.
· If the user chooses Cancel, 1-2-3 makes result blank and continues the macro.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top