I am trying to produce a data entry form on which combo boxes will behave as is illustrated on the attached file. The screen shot illustrated here is of combos on an OpenOffice Calc spreadsheet. I am redeveloping this application to run on MS Office and want to use a userform for data entry instead of a spreadsheet.
ExpenseScreen.docx
(186kb) downloaded 109 time(s).The Application is in
Trans.xlsm
(32kb) downloaded 104 time(s).A. BackgroundI have 2 issues - one is a design issue; the other is that the program crashes.
DesignAs iGrid only supports single level comboboxes, I firstly attempted to get around this limitation through use of a VBA combobox as the second level combo. But I had to abandon this approach as I could find no way of displaying the VBA combo on top of iGrid. Whenever I moved it to hopefully sit on the grid it disappeared behind it.
To overcome this issue I introduced a second form, the soul purpose of which was to house a combobox which I could then display on iGrid. The attached application shows how this works.
B. To Run the Application
1. Run the ExpenseEntry macro from the Macros button in the Code Group of the Excel Developer Ribbon
2. Select any cell in the A/C Name Column
3. Press Dropdown Button
4. Select one of the accounts (Level 1) presented
5. Press Dropdown button on combobox presented (Level 2)
6. Select SubAccount
C. What Is Desired to Happen
The selected subaccount should be presented in the cell originally selected in the A/C Name Column and both comboboxes should be closed
D. What actually happensThe First Level Account selected in The A/C Name Column is presented in the A/C Name Cell and the program crashes!!
Are there any suggestions on the approach and if I have to stick with this approach, (i) why does the program crash when the selection is made on the second level Combo and (ii) how do I get the value selected from the second level combo and passed back to the iGrid1_BeforeCommitEdit event to update the Level 1 TextComboCell.
Thanks for any help offered.