XEROF

 

xlsgen 4.0.0.67 : Form controls


Build 4.0.0.67 of xlsgen makes it possible to add Form controls to spreadsheets.


Form controls in xlsgen

Any of 11 form control types can be added :
  • Buttons
  • Check boxes
  • Radio buttons
  • Labels
  • Edit boxes
  • Spin controls
  • Scroll bars
  • List boxes
  • Combo boxes
  • Group boxes
  • Dialog boxes


They can be added to XLS as well as XLSX/XLSM and XLSB files, so you do not have to worry about the underlying file format.

Each form control has a number of custom properties to it and xlsgen exposes them. One of the most powerful ones is the ability to attach to it a VBA macro by its name.

Here is how to do add a button control and a list box (C++) :


// create a button and attach it an existing VBA macro

xlsgen::IXlsWorksheetPtr worksheet = workbook->AddWorksheet( L"sheet1" );

xlsgen::IXlsFormButtonPtr button = worksheet->FormControls->Buttons->Add(L"my button",2/*row1*/,2/*col1*/,5/*row2*/,6/*col2*/,0,0,0,0);

button->VBAMacro = L"=myButton_Click";


xlsgen::IXlsWorksheetPtr worksheet2 = workbook->AddWorksheet( L"sheet2" );

worksheet2->Label[2][7] = L"item1";
worksheet2->Label[3][7] = L"item2";
worksheet2->Label[4][7] = L"item3";
worksheet2->Label[5][7] = L"item4";

// create a list box and preselect two items

xlsgen::IXlsFormListBoxPtr listbox = worksheet2->FormControls->ListBoxes->Add(2,2,9,6,0,0,0,0);
listbox->SelectionType = xlsgen::listboxtype_multipleselection;
listbox->InputRange = L"=$G$2:$G$5";
listbox->SelectItem(3);
listbox->SelectItem(1);
listbox->LinkedCell = L"=$G$10";

Posted on 16-January-2017 21:21 | Category: xlsgen, Excel generator | comment[0] | trackback[0]

 

 

<-- previous page

< January >
0102030405
0607080910
1112131415
1617181920
2122232425
2627282930
31



 

 

This site
Home
Articles

DevTools
CPU-Z
EditPlus
ExplorerXP
Kill.exe
OllyDbg
DependencyWalker
Process Explorer
autoruns.exe
Araxis
COM Trace injection
CodeStats
NetBrute
FileMon/Regmon
BoundsChecker
AQTime profiler
Source monitor
GDI leaks tracking
Rootkit revealer
Rootkit removal
RunAsLimitedUser(1)
RunAsLimitedUser(2)

 

 

Liens
Le Plan B
Un jour à Paris
Meneame
Rezo.net (aggr)
Reseau voltaire
Cuba solidarity project
Le grand soir
L'autre journal
Le courrier suisse
L'Orient, le jour
Agoravox (aggr)