Creates a custom menu bar in Excel.
XLMENU must be used together with XLADDINS and XLWAIT
commands.
Syntax
CHGVAR |
VAR(&CMD) VALUE('WMENU') |
CHGVAR |
VAR(&PARM1) VALUE(' Captions="Buttons
labels" [;Remove] ') |
CHGVAR |
VAR(&PARM2) VALUE(' ') |
CALL |
PGM(LNCCMD)
PARM(&HANDLE &CMD &OPT &PARM1 + |
Parameters
Parameters |
|
Parm1 |
Tips
:
Displays a tooltip for each button. Remove : removes the previous menu. |
|
|
Note
1)
The add-in " LNCExcelAddin.xla" must be loaded by the XLADDINS command before using XLMENU.
When the XLWAIT command is called, the AS/400 program waits for an action on the part of the user. He takes again the hand when Word is closed, or on the action of one of the buttons of the new menu.
When returning from the XLWAIT command, the &RESULT variable contains the 5-digit number of the actuated button (from 1 to n).
2)
The custom menu will appear in the "Add-ins" tab of the Excel menu.
Example
CHGVAR |
VAR(&CMD) VALUE('XLADDINS') |
CHGVAR |
VAR(&PARM1) VALUE('%LNCDIR%\LNCExcelAddin.xla') |
CHGVAR |
VAR(&PARM2) VALUE(' ') |
CALL |
PGM(LNCCMD)
PARM(&HANDLE &CMD &OPT &PARM1 + |
|
|
CHGVAR |
VAR(&CMD) VALUE('XLMENU') |
CHGVAR |
VAR(&PARM1) VALUE('Captions="To validate;To cancel;Tips="Validate document;to cancel document"') |
CHGVAR |
VAR(&PARM2) VALUE(' ') |
CALL |
PGM(LNCCMD)
PARM(&HANDLE &CMD &OPT &PARM1 + |
|
|
CHGVAR |
VAR(&CMD) VALUE('XLWAIT') |
CHGVAR |
VAR(&PARM1) VALUE(' ') |
CHGVAR |
VAR(&PARM2) VALUE(' ') |
CALL |
PGM(LNCCMD)
PARM(&HANDLE &CMD &OPT &PARM1 + |