Userform support is probably the missing feature that is most asked for in terms of VBA support. However implementing it is not easy, many missing pieces are required, not least
i) various import tweaks
ii) support in the basic language for UserForm modules, UserForm modules are a type of Document modules. Document modules are ’special’ module types in Excel & Word. In Excel for instance these modules are tied directly to the Workbook object and to each Sheet object. The module for the workbook is called ThisWorkbook, and each Sheet module has the same name as the sheet . These modules are special because:
* this is where the event handlers for the object must be placed, including user interface controls located on the worksheet
* Any ordinary functions or subroutines that are placed in a workbook or sheet module can not be called from other modules unless you fully qualify the function e.g. Sheet1.Foo
* methods or functions of the associated object can be called from within the module as if they were implemented by the module itself. Or, they can be called externally via a fully qualified reference e.g. Sheet1.Protect
The UserForm module allows access to the controls in the Userform by name, e.g.
UserForm1.Label1.Caption = "myCaption"
additionally it is where UserForm specific event handlers are placed ( UserForm_Initialise, UserForm_Activate etc.. )
At the recent GoOOCon 2008 I demoed some prelimenary work showing support for MSO Userforms
I uploaded a prototype build ( windows ) and some example Excel demo documents to show the progress. ( hopefully a Linux build will follow soon ) and a set of demo documents
Demo Document descriptions
==========================
1) PartLocDB.xls, this document is from here, the version presented here has just a single line[1] change to make it work with openoffice.
This Userform demonstrates a basic userform that interacts with spreadsheet.
[1] the change is actually not to the line content but rather combining a set of instructions written over 2 lines into 1 ( e.g. removal of the ‘_’ line concatenation operator )
2) UserformExample.xls from here
Again this document demonstrates fairly simple handling of simple events ( like click events ) Additionally the state of various controls is examined programatically and the results used to populate data in the spreadsheet
note: This userform hightlights some issues with the import
a) the missing image for the imagecontrol, openoffice cannot embed images for the image control, only a link can be specified ( see issue 38215 )
b) missing spinbuttons ( see issue 38900 )
of course there are other problems not hightlighed here like the fact in OpenOffice.org basic controls aren’t data-aware, no layout, Openoffice.org Dialogs only support a single level of containment, missing controls etc. etc. But… we can still do useful things and provide a framework to build upon.
3) UserformMouseandTooltip.xls
This document demonstrates some more advanced features like
a) use of Userform_Initialise event ( used to populate the combobox )
b) import of tooltips
c) support for MouseMove events which is used tp update control specific context info in the lable at the bottom of the userform
d) use of Userform_Terminate event which raises a message box whenever the Userform is unloaded from memory

4) ExcelExamples-demo.xls
The sheet named Example 7 contains another simple userform example, when you push the “Display State of UserForm” button the state of all of the control is written into the read-only textboxes. Note this document also shows some support for workbook and worksheet events.

5) progress-1.xls is an implementation of http://www.j-walk.com/ss/excel/tips/tip34.htm, see details of this very nice progress bar implementation. ( this also shows why the supporting the UserForm_Activate event is important )

6) progress-2.xls is also based on http://www.j-walk.com/ss/excel/tips/tip34.htm but uses OLE progress bar controls ( and there are 2 nested progress bars running simulataneously )

Note: progress-1 & progress-2 do not currently work well with Windows, seems to be due to some strange (VCL?) problem where we seem to actually get the activate event before the dialog is actually shown
So, with this behaviour, while processing and updating the controls ( e.g. the progressbar ) we see nothing as the dialog isn’t yet displayed. Furthermore since the dialog is immedialely ‘Unloaded’ after processing you don’t even get to see the dialog.
Some test documents showing some api support for OLE controls on a spreadsheet.
aControlDemo.xls - simple test document. Use the combo box to select a control, use the spin buttons to adjust position and size. Notice the button below the combox whose caption is changed to indicate whether pressing the button will show or hide the control
aListBoxDemo.xls - another simple test document demostrating some programatic interaction, use the button to select whether the list box is single or multi-select, use the “>>>>” button to transfer the content of the list box.