PreviousNext
Help > Programming with LAUNCHER Office > LNCCMD commands > Commands list > XLMENU command
XLMENU command

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"
[;Tips="Tooltips"]

[;Remove]

')

CHGVAR

VAR(&PARM2) VALUE(' ')

CALL

PGM(LNCCMD) PARM(&HANDLE &CMD &OPT &PARM1 +
&PARM2 &RESULT)

 

Parameters

Parameters

 

Parm1


Captions :
Lets you label each button of the new menu bar.
The labels are separated from each other by a semicolon (;).
The number of labels determines the number of buttons on the menu bar.

Tips : Displays a tooltip for each button.
The tips are separated from each other by a semicolon (;). Their number must match the number of labels.

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 +
&PARM2 &RESULT)

 

 

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 +
&PARM2 &RESULT)

 

 

CHGVAR

VAR(&CMD) VALUE('XLWAIT')

CHGVAR

VAR(&PARM1) VALUE(' ')

CHGVAR

VAR(&PARM2) VALUE(' ')

CALL

PGM(LNCCMD) PARM(&HANDLE &CMD &OPT &PARM1 +
&PARM2 &RESULT)