Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a multi-select list box with the column count property set to 2
The program (before loading the form) sets the range name 'Contractors' to cover two columns: The contractors' names and their respective VAT registration numbers. The form loads Rowsource with Factors!Contractors and shows the names of the contractors and their VAT registration numbers. So far so good. The user is asked to select one (or more) contractors. I am trying to get the routine below to load the two (Public) string arrays: Contractor(xx) and VatRegistration(xx) with the values wherever a selection(s) is made: Extract from the 'Run' button code: Private Sub cmdRun_Click() Dim i As Integer LBoxContractors.BoundColumn = 1 LBoxContractors.TextColumn = 2 If LBoxContractors.ListIndex < -1 Then For i = 0 To LBoxContractors.ListCount - 1 If LBoxContractors.Selected(i) Then Contractor(i) = LBoxContractors.List(i) VatRegistration(i) = LBoxContractors.Text End If Next i End If End sub The Contractor(i) loads up fine but the VatRegistration(i) has just a NUL string (""). Can't seem to be able to assign the value in the 2nd column. Any help or suggestions or ideas or better ways of doing this would be most welcolm. Thanks in advance, Peter Bircher |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to find a value with multi-column, multi-record list | Excel Worksheet Functions | |||
Multi Select from Drop List | Excel Discussion (Misc queries) | |||
how do I select multi values from a list | Excel Discussion (Misc queries) | |||
List Box Multi Select Option | Excel Worksheet Functions | |||
Multi Select List Box | Excel Programming |