All
I have a listbox with 2 columns. The rowsource is not bounded. Values are picked up from a table. Colde below fills the first column of the listbox.
In next step the values in this listbox must be compaired with headers in an Excel-file. If the header is found in the Excel-file, the second column should contain an X.
So, let's assume I have a listbox with next values
Column 1 Column2
Counter
Name
Location
The Excel file I open only got Counter and Location. The listbox should display
Column1 Column2
Counter X
Name
Location X
I tried to use some code like
but the third line where I try to publish the "X" in the second column fails with error "Object required"
How can this be solved?
Regards
Ino
I have a listbox with 2 columns. The rowsource is not bounded. Values are picked up from a table. Colde below fills the first column of the listbox.
Code:
Do While Not rsExpectedColumns.EOF
Me.lstColumns.AddItem rsExpectedColumns![Column]
rsExpectedColumns.MoveNext
Loop
In next step the values in this listbox must be compaired with headers in an Excel-file. If the header is found in the Excel-file, the second column should contain an X.
So, let's assume I have a listbox with next values
Column 1 Column2
Counter
Name
Location
The Excel file I open only got Counter and Location. The listbox should display
Column1 Column2
Counter X
Name
Location X
I tried to use some code like
Code:
For intCounter = 0 to me.lstColumns.Listcount - 1
if Me.lstColumns.ItemData(intCounter)=ColumnSchema("Column_Name") Then
Me.lstColumns.Column(intCounter, 1) = "X"
End If
Next
How can this be solved?
Regards
Ino
Last edited: