bryggya
01-13-2008, 09:41 AM
I'm using the header fields from a csv file and a collection of User attributes from Active Directory to create a mapping form displaying the array of csv fields in one column and list boxes of the collection in the adjacent comlumn.
I want to programatically generate list boxes, each one with a suffix value that corresponds to the array index number for the csv column. So what I need to figure out is if there's a substitution parameter available in VB 6.0 that will read the counter variable in a For loop as a literal value.
Here's the concept in rather abbreviated logic
csvlist = ubound(csvfields)
For a in csvlist
Dim Listbox_"a" as Listbox 'Give index suffix so you create the temp objects
'Listbox_1,Listbox_2...
For Each ADattr in Usrattr.collection 'repeat
Listbox_"a".additem ADattr.name
Next
Next
The intention is to provide flexibility to the form, as there could be varying numbers of header fields (20 to 30), so that the corresponding column pairs:
csv_header = listbox_value can then be written to a configuration file.
Thought this would be the easiest way to map a group of fix values to anothe r (the AD User collection) that has dozens of possible selections.
I want to programatically generate list boxes, each one with a suffix value that corresponds to the array index number for the csv column. So what I need to figure out is if there's a substitution parameter available in VB 6.0 that will read the counter variable in a For loop as a literal value.
Here's the concept in rather abbreviated logic
csvlist = ubound(csvfields)
For a in csvlist
Dim Listbox_"a" as Listbox 'Give index suffix so you create the temp objects
'Listbox_1,Listbox_2...
For Each ADattr in Usrattr.collection 'repeat
Listbox_"a".additem ADattr.name
Next
Next
The intention is to provide flexibility to the form, as there could be varying numbers of header fields (20 to 30), so that the corresponding column pairs:
csv_header = listbox_value can then be written to a configuration file.
Thought this would be the easiest way to map a group of fix values to anothe r (the AD User collection) that has dozens of possible selections.