BigJC
10-03-2011, 05:46 AM
Hi guys and girls,
once again i am here for your infinite wisdom.
A few of you have helped me get past a major problem i had now i am onto something i hope is very easy.
I have a program that creates listboxes at runtime that list data stored in each row of a worksheet.
How can i reference these listboxes in VBA so i can add items to them after they have been made outside of the procedure they are created in.
i.e. i know the names will carry the same number as the row their data is stored in.
So row 5 will add data to ListBox5, row 7 ListBox7 etc
How can i programmatically address these to update them?
I will be updating data in row 5 from anohter control but also want the data to add into the listbox as i go.
i can't address it like ListBox & xRow .additem
and i dont think i can use a variable can i like lbx = "listbox" & xRow
lbx.additem xxx
No i cant bind the listbox to the row as the data is displayed oddly.
Also its a 2 column listbox if that matters.
Thanks in advance.
once again i am here for your infinite wisdom.
A few of you have helped me get past a major problem i had now i am onto something i hope is very easy.
I have a program that creates listboxes at runtime that list data stored in each row of a worksheet.
How can i reference these listboxes in VBA so i can add items to them after they have been made outside of the procedure they are created in.
i.e. i know the names will carry the same number as the row their data is stored in.
So row 5 will add data to ListBox5, row 7 ListBox7 etc
How can i programmatically address these to update them?
I will be updating data in row 5 from anohter control but also want the data to add into the listbox as i go.
i can't address it like ListBox & xRow .additem
and i dont think i can use a variable can i like lbx = "listbox" & xRow
lbx.additem xxx
No i cant bind the listbox to the row as the data is displayed oddly.
Also its a 2 column listbox if that matters.
Thanks in advance.