Hi
Problem
The user selects an item from a list box (LB1) – this is list of files found in a given directory – so it could be a list of 5 or 500.
StrPack is a string of filenames separated by ‘;’. This works fine for a small number of files. But if the string is over about 1900 characters I get an error when I try to do
Me!LB1.RowSource = strPack
Possible Solutions
1 – find a way to increase the capacity of LB1 (unlikely)
2 – copy all the filenames into a table and make the table the ‘Row Source ‘. Can’t do this as I have multiple users so managing unique tables for each user is not attractive
3 – Create an array in VB to hold the list of items and then make the array the ‘Row Source’ for the list box.
Option 3 is appealing but …
1- I don’t know how to handle arrays in VB
2- I don’t know how to assign an array to a list box’s Row Source
Any suggestions would be appreciated
Alternatively is there a simple add-on or control that list the files in a given directory?
Thanks
Problem
The user selects an item from a list box (LB1) – this is list of files found in a given directory – so it could be a list of 5 or 500.
StrPack is a string of filenames separated by ‘;’. This works fine for a small number of files. But if the string is over about 1900 characters I get an error when I try to do
Me!LB1.RowSource = strPack
Possible Solutions
1 – find a way to increase the capacity of LB1 (unlikely)
2 – copy all the filenames into a table and make the table the ‘Row Source ‘. Can’t do this as I have multiple users so managing unique tables for each user is not attractive
3 – Create an array in VB to hold the list of items and then make the array the ‘Row Source’ for the list box.
Option 3 is appealing but …
1- I don’t know how to handle arrays in VB
2- I don’t know how to assign an array to a list box’s Row Source
Any suggestions would be appreciated
Alternatively is there a simple add-on or control that list the files in a given directory?
Thanks