String manipulation
Forums
Hi All,
Need some help with string manipulation.
Here is my original array definition:
UserChoice(0)= ListOfColumns(dlg.DropListBox1) 'Ref
UserChoice(1)= ListOfColumns(dlg.DropListBox2) 'Value
UserChoice(2)= ListOfColumns(dlg.DropListBox3) 'Dr
UserChoice(3)= ListOfColumns(dlg.DropListBox4) 'Cr
UserChoice(4)= ListOfColumns(dlg.DropListBox5) 'Date
UserChoice(5)= ListOfColumns(dlg.DropListBox6) 'Prepared ID
UserChoice(6)= ListOfColumns(dlg.DropListBox7) 'Account No
UserChoice(7)= ListOfColumns(dlg.DropListBox8) 'Account Name
UserChoice(8)= ListOfColumns(dlg.DropListBox9) 'Details
UserChoice(9)= ListOfColumns(dlg.DropListBox10) 'FS Category
UserChoice(10)= ListOfColumns(dlg.DropListBox11) 'FS Type
UserChoice(11)= ListOfColumns(dlg.DropListBox12) 'Reviewer ID
UserChoice(12)= ListOfColumns(dlg.DropListBox13) 'Manual Journal Ref
I have now converted it into the array with the use of loop:
For i = 0 To 12
UserChoice (i) = " & ListOfColumns(dlg.DropListBox & i & ) & "
Next i
Which should display the value for each of 13 DropListBox but i having a problem to convert the line :
" & ListOfColumns(dlg.DropListBox & i & ) & " into ListOfColumns(dlg.DropListBox(i) )
Any idea how can I manipulate that bit please.
Regards
Hi Pawelski_33, try the
Hi Pawelski_33, try the following:
For i = 0 to 12
UserChoice(i) = ListOfColumns(dlg.DropListBox & i)
next i
I haven't tested it out but I think it should work.